diff options
author | Martin Kraft <martinkraft@gmail.com> | 2018-03-23 09:08:49 -0400 |
---|---|---|
committer | Martin Kraft <martinkraft@gmail.com> | 2018-03-23 09:08:49 -0400 |
commit | 5fa1b3581955761bd39c310bc88b1489d963a9fc (patch) | |
tree | 25e6dd11592102807abebbb5de100f7d867005d8 /app/import_test.go | |
parent | 37f0e5e0ebc0595efe2c65ffb84fa096dc8c5493 (diff) | |
parent | 87762ae62eb887dfb3fd0957040919aede46f7d4 (diff) | |
download | chat-5fa1b3581955761bd39c310bc88b1489d963a9fc.tar.gz chat-5fa1b3581955761bd39c310bc88b1489d963a9fc.tar.bz2 chat-5fa1b3581955761bd39c310bc88b1489d963a9fc.zip |
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'app/import_test.go')
-rw-r--r-- | app/import_test.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/import_test.go b/app/import_test.go index be2befd82..ef2d01cc0 100644 --- a/app/import_test.go +++ b/app/import_test.go @@ -4,6 +4,7 @@ package app import ( + "path/filepath" "runtime/debug" "strings" "testing" @@ -370,7 +371,7 @@ func TestImportValidateUserImportData(t *testing.T) { // Test a valid User with all fields populated. testsDir, _ := utils.FindDir("tests") data = UserImportData{ - ProfileImage: ptrStr(testsDir + "test.png"), + ProfileImage: ptrStr(filepath.Join(testsDir, "test.png")), Username: ptrStr("bob"), Email: ptrStr("bob@example.com"), AuthService: ptrStr("ldap"), @@ -1471,7 +1472,7 @@ func TestImportImportUser(t *testing.T) { username := model.NewId() testsDir, _ := utils.FindDir("tests") data = UserImportData{ - ProfileImage: ptrStr(testsDir + "test.png"), + ProfileImage: ptrStr(filepath.Join(testsDir, "test.png")), Username: &username, Email: ptrStr(model.NewId() + "@example.com"), Nickname: ptrStr(model.NewId()), @@ -1527,7 +1528,7 @@ func TestImportImportUser(t *testing.T) { // Alter all the fields of that user. data.Email = ptrStr(model.NewId() + "@example.com") - data.ProfileImage = ptrStr(testsDir + "testgif.gif") + data.ProfileImage = ptrStr(filepath.Join(testsDir, "testgif.gif")) data.AuthService = ptrStr("ldap") data.AuthData = &username data.Nickname = ptrStr(model.NewId()) |