diff options
Diffstat (limited to 'model/utils_test.go')
-rw-r--r-- | model/utils_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/model/utils_test.go b/model/utils_test.go index 92354c0a1..b7f5dc628 100644 --- a/model/utils_test.go +++ b/model/utils_test.go @@ -8,6 +8,7 @@ import ( "strings" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -47,6 +48,17 @@ func TestAppErrorJunk(t *testing.T) { } } +func TestCopyStringMap(t *testing.T) { + itemKey := "item1" + originalMap := make(map[string]string) + originalMap[itemKey] = "val1" + + copyMap := CopyStringMap(originalMap) + copyMap[itemKey] = "changed" + + assert.Equal(t, "val1", originalMap[itemKey]) +} + func TestMapJson(t *testing.T) { m := make(map[string]string) |