diff options
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r-- | api4/apitestlib.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/api4/apitestlib.go b/api4/apitestlib.go index 6edd37812..386afdadd 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -11,6 +11,7 @@ import ( "net" "net/http" "os" + "path/filepath" "reflect" "strconv" "strings" @@ -302,7 +303,11 @@ func (me *TestHelper) CreateUserWithClient(client *model.Client4) *model.User { } utils.DisableDebugLogForTest() - ruser, _ := client.CreateUser(user) + ruser, response := client.CreateUser(user) + if response.Error != nil { + panic(response.Error) + } + ruser.Password = "Password1" store.Must(me.App.Srv.Store.User().VerifyEmail(ruser.Id)) utils.EnableDebugLogForTest() @@ -675,7 +680,7 @@ func CheckInternalErrorStatus(t *testing.T, resp *model.Response) { func readTestFile(name string) ([]byte, error) { path, _ := utils.FindDir("tests") - file, err := os.Open(path + "/" + name) + file, err := os.Open(filepath.Join(path, name)) if err != nil { return nil, err } |