add test for plancontext

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-11-18 14:21:18 -08:00
parent 22fb91548b
commit 2beace385c

View 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)
}