2
0
mirror of https://github.com/status-im/status-go.git synced 2025-01-11 07:07:24 +00:00

[] : 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

@ -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
}