add test for plancontext
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
22fb91548b
commit
2beace385c
18
plancontext/context_test.go
Normal file
18
plancontext/context_test.go
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
package plancontext
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/require"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestContext(t *testing.T) {
|
||||||
|
ctx := New()
|
||||||
|
|
||||||
|
id := ctx.Secrets.Register(&Secret{
|
||||||
|
PlainText: "test",
|
||||||
|
})
|
||||||
|
secret := ctx.Secrets.Get(id)
|
||||||
|
require.NotNil(t, secret)
|
||||||
|
require.Equal(t, "test", secret.PlainText)
|
||||||
|
}
|
Reference in New Issue
Block a user