[#930] : False positive e2e test fix

This commit is contained in:
Adrià Cidre 2018-05-10 08:41:29 +02:00 committed by Igor Mandrigin
parent 375d5ec8c3
commit 37a58a513d
1 changed files with 4 additions and 2 deletions

View File

@ -134,11 +134,12 @@ func (s *StatusAPISuite) testStatusLogin(testParams statusTestParams) *status.Lo
result := s.Backend.CallPrivateRPC(basicCall)
if testParams.ExpectedError == nil {
s.NotContains(result, "error")
var r struct {
Error string `json:"error"`
Result *status.LoginResponse `json:"result"`
}
s.NoError(json.Unmarshal([]byte(result), &r))
s.Empty(r.Error)
return r.Result
}
@ -179,11 +180,12 @@ func (s *StatusAPISuite) testStatusSignup(testParams statusTestParams) *status.S
result := s.Backend.CallPrivateRPC(basicCall)
if testParams.ExpectedError == nil {
s.NotContains(result, "error")
var r struct {
Error string `json:"error"`
Result *status.SignupResponse `json:"result"`
}
s.NoError(json.Unmarshal([]byte(result), &r))
s.Empty(r.Error)
return r.Result
}