func StatusError(t *testing.T, expected string, status int, actual error) {
	var err string
	var actualStatus int
	if actual != nil {
		err = actual.Error()
		actualStatus = StatusCode(actual)
	}
	if expected != err {
		t.Errorf("Unexpected error: %s", err)
	}
	if status != actualStatus {
		t.Errorf("Unexpected status code: %d", actualStatus)
	}
	if actual != nil {
		t.SkipNow()
	}
}
// StatusError compares actual.Error() and the embeded HTTP status code against
// expected, and triggers an error if they do not match. If actual is non-nil,
// t.SkipNow() is called as well.
StatusError compares actual.Error() and the embeded HTTP status code against
expected, and triggers an error if they do not match. If actual is non-nil,
t.SkipNow() is called as well.
// StatusError compares actual . Error () and the embeded HTTP status code against // expected and triggers an error if they do not match . If actual is non - nil // t . SkipNow () is called as well .
func StatusError(t *testing.T, expected string, status int, actual error) {
	var err string
	var actualStatus int
	if actual != nil {
		err = actual.Error()
		actualStatus = StatusCode(actual)
	}
	if expected != err {
		t.Errorf("Unexpected error: %s", err)
	}
	if status != actualStatus {
		t.Errorf("Unexpected status code: %d", actualStatus)
	}
	if actual != nil {
		t.SkipNow()
	}
}
func StatusError ( t * testing . T , expected string , status int , actual error ) { var err string var actualStatus int if actual != nil { err = actual . Error ( ) actualStatus = StatusCode ( actual ) } if expected != err { t . Errorf ( " " , err ) } if status != actualStatus { t . Errorf ( " " , actualStatus ) } if actual != nil { t . SkipNow ( ) } }
StatusError compares actual.Error() and the embeded HTTP status code against
expected, and triggers an error if they do not match.
StatusError compares actual . Error () and the embeded HTTP status code against expected and triggers an error if they do not match .