more tests

This commit is contained in:
Sergey Chernov 2022-12-18 23:18:19 +01:00
parent 71a5f3c8f1
commit 889e00448f

View File

@ -219,6 +219,7 @@ internal class WsServerKtTest {
val slc = SuperloginClient<TestData, S1>(client) val slc = SuperloginClient<TestData, S1>(client)
assertEquals(LoginState.LoggedOut, slc.state.value) assertEquals(LoginState.LoggedOut, slc.state.value)
var rt = slc.register("foo", "passwd", TestData("bar!")) var rt = slc.register("foo", "passwd", TestData("bar!"))
val dk1 = slc.dataKey!!
assertIs<Registration.Result.Success>(rt) assertIs<Registration.Result.Success>(rt)
val secret = rt.secret val secret = rt.secret
var token = rt.loginToken var token = rt.loginToken
@ -244,8 +245,7 @@ internal class WsServerKtTest {
assertEquals("bar!", ar.data?.foo) assertEquals("bar!", ar.data?.foo)
assertTrue { slc.isLoggedIn } assertTrue { slc.isLoggedIn }
assertEquals("foo", slc.call(api.loginName)) assertEquals("foo", slc.call(api.loginName))
assertEquals(dk1.id, slc.dataKey!!.id)
} }
} }
@Test @Test