diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-05 23:52:07 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-05 23:52:07 -0800 |
commit | 9be9cf8d9d82e221aa6ce5f3148f2a0c487c6e54 (patch) | |
tree | b4b823129e1ae6de5a277c2675489689fd77c2c0 /api | |
parent | fcbb3d556180fe409d37b54a7da33d9251a58b43 (diff) | |
download | chat-9be9cf8d9d82e221aa6ce5f3148f2a0c487c6e54.tar.gz chat-9be9cf8d9d82e221aa6ce5f3148f2a0c487c6e54.tar.bz2 chat-9be9cf8d9d82e221aa6ce5f3148f2a0c487c6e54.zip |
adding debugging
Diffstat (limited to 'api')
-rw-r--r-- | api/user_test.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/api/user_test.go b/api/user_test.go index 522ff05d5..dbd72a2b3 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -474,6 +474,8 @@ func TestUserUpdate(t *testing.T) { time2 := model.GetMillis() + time.Sleep(100 * time.Millisecond) + user.FullName = "Jim Jimmy" user.TeamId = "12345678901234567890123456" user.LastActivityAt = time2 @@ -490,13 +492,12 @@ func TestUserUpdate(t *testing.T) { if result.Data.(*model.User).TeamId != team.Id { t.Fatal("TeamId should not have updated") } - // BAD TESTS BECAUSE OF RACE CONDITION - // if result.Data.(*model.User).LastActivityAt != time1 { - // t.Fatal("LastActivityAt should not have updated") - // } - // if result.Data.(*model.User).LastPingAt != time1 { - // t.Fatal("LastPingAt should not have updated") - // } + if result.Data.(*model.User).LastActivityAt == time2 { + t.Fatal("LastActivityAt should not have updated") + } + if result.Data.(*model.User).LastPingAt == time2 { + t.Fatal("LastPingAt should not have updated") + } if result.Data.(*model.User).Roles != "" { t.Fatal("Roles should not have updated") } |