✨🚧 Implement admin interface to manage shares and users
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user