Skip to content

Commit

Permalink
Added variable test for NewVariables construction
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 13, 2024
1 parent 0145d2d commit 32de4e3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/unittest/cacao/variables_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ import (
"github.com/go-playground/assert/v2"
)

func TestNewVariables(t *testing.T) {
variable := cacao.Variable{
Type: "string",
Name: "variable 1",
Value: "value 1",
}
variables := cacao.NewVariables(variable)
expected := cacao.Variables{"variable 1": variable}
assert.Equal(t, variables, expected)
}

func TestVariablesFind(t *testing.T) {
variables := make(cacao.Variables)
inserted := cacao.Variable{
Expand Down

0 comments on commit 32de4e3

Please sign in to comment.