mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
Auth: Refactor user model and path validation #98
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -1039,6 +1039,7 @@ func TestUser_SetBasePath(t *testing.T) {
|
||||
|
||||
assert.Equal(t, "base", u.SetBasePath("base").GetBasePath())
|
||||
assert.Equal(t, "users/test", u.SetBasePath("~").GetBasePath())
|
||||
assert.Equal(t, "users/test", u.DefaultBasePath())
|
||||
assert.Equal(t, "users/test", u.GetUploadPath())
|
||||
})
|
||||
}
|
||||
@@ -1072,6 +1073,7 @@ func TestUser_SetUploadPath(t *testing.T) {
|
||||
assert.Equal(t, "upload", u.SetUploadPath("upload").GetUploadPath())
|
||||
assert.Equal(t, "base/upload", u.SetBasePath("base").GetUploadPath())
|
||||
assert.Equal(t, "base", u.SetUploadPath("~").GetUploadPath())
|
||||
assert.Equal(t, "users/test", u.DefaultBasePath())
|
||||
assert.Equal(t, "users/test", u.SetBasePath("~").GetUploadPath())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user