✨🚧 Implement admin interface to manage shares and users

This commit is contained in:
2020-10-24 16:57:00 +02:00
parent f798551b97
commit 5034d1a1f8
12 changed files with 503 additions and 2 deletions
+17
View File
@@ -201,6 +201,23 @@ func TestStoreShareHandling(t *testing.T) {
_ = store.RemoveUser(user2.Username)
}()
t.Run("can get single share", func(t *testing.T) {
share, err := store.GetShare(share1.UUID.String())
if err != nil {
t.Errorf("unexpected error: %v", err)
}
if share != share1 {
t.Error("share should equal share1")
}
})
t.Run("unknown share cannot be retrieved", func(t *testing.T) {
_, err := store.GetShare(uuid.NewV4().String())
if err != ErrShareNotFound {
t.Errorf("unexpected error: %v", err)
}
})
t.Run("multiple shares should exist", func(t *testing.T) {
shares, _ := store.GetShares()
if len(shares) != 3 {