Added test to check user-agent header

This commit is contained in:
DarthSett
2019-10-28 19:34:22 +05:30
parent 4eab46670e
commit ccfd2f0427

View File

@@ -32,6 +32,10 @@ func dummyServer(t *testing.T, expectedToken, expectedID string, expectedVersion
t.Errorf("want %q, have %q", expectedVersion, have)
}
if have := r.Header.Get("user-agent"); "Scope_Probe/"+expectedVersion!=have {
t.Errorf("want %q, have %q","Scope_Probe/"+expectedVersion,have)
}
var have report.Report
reader := r.Body