Skip to content

Commit a14621f

Browse files
committed
make test better
1 parent 1f1cc72 commit a14621f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

cmd/dbc/add_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,8 @@ func (suite *SubcommandTestSuite) TestAdd_JSON_Constraint() {
472472
suite.Equal(1, env.SchemaVersion)
473473
suite.Equal("add.response", env.Kind)
474474

475-
// verify we aren't escaping the > character in the JSON output
476-
suite.Equal(string(env.Payload), `{"driver_list_path":"`+filepath.Join(suite.tempdir, "dbc.toml")+
477-
`","drivers":[{"name":"test-driver-1","version_constraint":">=1.0.0"}]}`)
475+
// verify > is not HTML-escaped (>) in the JSON output
476+
suite.NotContains(string(env.Payload), "\\u003e")
478477

479478
var resp jsonschema.AddResponse
480479
suite.Require().NoError(json.Unmarshal(env.Payload, &resp))

0 commit comments

Comments
 (0)