diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/post_test.go | 1 | ||||
-rw-r--r-- | api/user_test.go | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/api/post_test.go b/api/post_test.go index 19a88f737..cbba83af6 100644 --- a/api/post_test.go +++ b/api/post_test.go @@ -520,6 +520,7 @@ func TestDeletePosts(t *testing.T) { post3a1 := &model.Post{ChannelId: channel1.Id, Message: "a" + model.NewId() + "a", RootId: post3.Id} post3a1 = Client.Must(Client.CreatePost(post3a1)).Data.(*model.Post) + time.Sleep(10 * time.Millisecond) Client.Must(Client.DeletePost(channel1.Id, post3.Id)) r2 := Client.Must(Client.GetPosts(channel1.Id, 0, 10, "")).Data.(*model.PostList) diff --git a/api/user_test.go b/api/user_test.go index e236adeaf..8b95bdf55 100644 --- a/api/user_test.go +++ b/api/user_test.go @@ -54,6 +54,13 @@ func TestCreateUser(t *testing.T) { } } + ruser.Data.(*model.User).Email = "test2@nowhere.com" + if _, err := Client.CreateUser(ruser.Data.(*model.User), ""); err != nil { + if err.Message != "An account with that username already exists." { + t.Fatal(err) + } + } + ruser.Data.(*model.User).Email = "" if _, err := Client.CreateUser(ruser.Data.(*model.User), ""); err != nil { if err.Message != "Invalid email" { |