2020-12-29 10:45:49 +00:00
|
|
|
package callflag
|
2020-06-10 12:50:51 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestCallFlag_Has(t *testing.T) {
|
|
|
|
require.True(t, AllowCall.Has(AllowCall))
|
|
|
|
require.True(t, (AllowCall | AllowNotify).Has(AllowCall))
|
|
|
|
require.False(t, (AllowCall).Has(AllowCall|AllowNotify))
|
|
|
|
require.True(t, All.Has(ReadOnly))
|
|
|
|
}
|