mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-24 08:01:06 +00:00
login_test: minor cleanup
This commit is contained in:
parent
d1763418a8
commit
0ebd162af0
@ -97,7 +97,6 @@ func TestMain(m *testing.M) {
|
|||||||
|
|
||||||
func TestLoginSuccSequence(t *testing.T) {
|
func TestLoginSuccSequence(t *testing.T) {
|
||||||
is := is.New(t)
|
is := is.New(t)
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
@ -125,14 +124,12 @@ func TestLoginSuccSequence(t *testing.T) {
|
|||||||
is.Equal(resp.ICharCount, int8(0)) // should have 0 characters
|
is.Equal(resp.ICharCount, int8(0)) // should have 0 characters
|
||||||
|
|
||||||
// verify account was created
|
// verify account was created
|
||||||
acc, err := testDB.TryLogin("testLoginSequence", "test")
|
_, err = testDB.TryLogin("testLoginSequence", "test")
|
||||||
is.NoErr(err) // GetAccount() should not return an error
|
is.NoErr(err) // TryLogin() should not return an error
|
||||||
is.Equal(acc.Login, "testLoginSequence") // should have the same ID
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLoginFailSequence(t *testing.T) {
|
func TestLoginFailSequence(t *testing.T) {
|
||||||
is := is.New(t)
|
is := is.New(t)
|
||||||
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user