test: fix most integration tests (live)

This commit is contained in:
James Houlahan
2020-04-09 10:24:58 +02:00
parent bafd4e714e
commit fec5f2d3c3
18 changed files with 124 additions and 104 deletions

View File

@ -142,7 +142,7 @@ func (api *FakePMAPI) AuthRefresh(token string) (*pmapi.Auth, error) {
}
func (api *FakePMAPI) Logout() {
_ = api.DeleteAuth()
api.DeleteAuth()
api.ClearData()
}
@ -150,14 +150,12 @@ func (api *FakePMAPI) DeleteAuth() error {
if err := api.checkAndRecordCall(DELETE, "/auth", nil); err != nil {
return err
}
// Logout will also emit change to auth channel
api.sendAuth(nil)
api.controller.deleteSession(api.uid)
return nil
}
func (api *FakePMAPI) ClearData() {
api.controller.deleteSession(api.uid)
api.unsetUser()
}