TUN-2567: AuthOutcome can be turned back into AuthResponse

This commit is contained in:
Adam Chalmers
2019-11-18 17:01:20 -06:00
parent 0676923d24
commit 7173da9359
2 changed files with 30 additions and 1 deletions

View File

@@ -58,9 +58,13 @@ func TestAuthenticateResponseOutcome(t *testing.T) {
Jwt: tt.fields.Jwt,
HoursUntilRefresh: tt.fields.HoursUntilRefresh,
}
if got := ar.Outcome(); !reflect.DeepEqual(got, tt.want) {
got := ar.Outcome()
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("AuthenticateResponse.Outcome() = %T, want %v", got, tt.want)
}
if got != nil && !reflect.DeepEqual(got.Serialize(), ar) {
t.Errorf(".Outcome() and .Serialize() should be inverses but weren't. Expected %v, got %v", ar, got.Serialize())
}
})
}
}