summaryrefslogtreecommitdiffstats
path: root/api/user_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/user_test.go')
-rw-r--r--api/user_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/api/user_test.go b/api/user_test.go
index 6e99ab930..f2b69aba4 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" {