Skip to content

Commit

Permalink
add marshal error test
Browse files Browse the repository at this point in the history
Signed-off-by: Flipez <code@brauser.io>
  • Loading branch information
Flipez committed Mar 14, 2022
1 parent 4b8bbba commit 0ef2a2b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions object/string_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func TestStringObjectMethods(t *testing.T) {
{`"test" * 2`, "testtest"},
{`2 * "test"`, "testtest"},
{`"test".to_json()`, `"test"`},
{`{"test": HTTP.new()}.to_json()`, `Error while marshal value: json: error calling MarshalJSON for type *object.Hash: unable to serialize value: "test"`},
}

testInput(t, tests)
Expand Down

0 comments on commit 0ef2a2b

Please sign in to comment.