This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
2017-04-05 19:03:44 +02:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAuth(t *testing.T) {
|
|
|
|
assert := assert.New(t)
|
|
|
|
|
|
|
|
perm, err := HasPermission("session", PermissionCreateGood)
|
|
|
|
assert.NoError(err)
|
|
|
|
assert.True(perm)
|
2017-04-05 20:23:29 +02:00
|
|
|
|
|
|
|
perm, err = HasPermission("session", PermissionCreateGood)
|
|
|
|
assert.NoError(err)
|
|
|
|
assert.True(perm)
|
2017-04-05 19:03:44 +02:00
|
|
|
}
|