mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 10:21:00 +00:00
24 lines
478 B
Go
24 lines
478 B
Go
package capability
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"code.google.com/p/go.net/context"
|
|
"github.com/franela/goblin"
|
|
)
|
|
|
|
func TestBlobstore(t *testing.T) {
|
|
caps := map[string]bool{}
|
|
caps[Registration] = true
|
|
|
|
ctx := NewContext(context.Background(), caps)
|
|
|
|
g := goblin.Goblin(t)
|
|
g.Describe("Capabilities", func() {
|
|
|
|
g.It("Should get capabilities from context", func() {
|
|
g.Assert(Enabled(ctx, Registration)).Equal(true)
|
|
g.Assert(Enabled(ctx, "Fake Key")).Equal(false)
|
|
})
|
|
})
|
|
}
|