mirror of
https://github.com/binwiederhier/ntfy.git
synced 2024-11-30 11:16:55 +03:00
14 lines
371 B
Go
14 lines
371 B
Go
|
package user
|
||
|
|
||
|
import (
|
||
|
"github.com/stretchr/testify/require"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestPermission(t *testing.T) {
|
||
|
require.Equal(t, PermissionReadWrite, NewPermission(true, true))
|
||
|
require.Equal(t, PermissionRead, NewPermission(true, false))
|
||
|
require.Equal(t, PermissionWrite, NewPermission(false, true))
|
||
|
require.Equal(t, PermissionDenyAll, NewPermission(false, false))
|
||
|
}
|