test: some work on integration tests (fake)

This commit is contained in:
James Houlahan
2020-04-09 13:49:07 +02:00
parent fec5f2d3c3
commit ed8595fa5b
6 changed files with 25 additions and 15 deletions

View File

@ -65,9 +65,12 @@ func (api *FakePMAPI) Auth(username, password string, authInfo *pmapi.AuthInfo)
auth := &pmapi.Auth{
TwoFA: user.get2FAInfo(),
RefreshToken: session.refreshToken,
ExpiresIn: 86400,
}
auth.DANGEROUSLYSetUID(session.uid)
api.sendAuth(auth)
return auth, nil
}
@ -135,7 +138,10 @@ func (api *FakePMAPI) AuthRefresh(token string) (*pmapi.Auth, error) {
auth := &pmapi.Auth{
RefreshToken: session.refreshToken,
ExpiresIn: 86400,
}
auth.DANGEROUSLYSetUID(session.uid)
api.sendAuth(auth)
return auth, nil