Skip to content

Commit 6a016cf

Browse files
dbadurajohandorland
authored andcommitted
changed way of assertion
1 parent 848af29 commit 6a016cf

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

draft.go

+1-6
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,7 @@ func parseSchemaURL(documentNode interface{}) (string, *Draft, error) {
9494
}
9595

9696
if !isKind(documentNode, reflect.Map) {
97-
return "", nil, errors.New(formatErrorDescription(
98-
Locale.ParseError(),
99-
ErrorDetails{
100-
"expected": STRING_SCHEMA,
101-
},
102-
))
97+
return "", nil, errors.New("schema is invalid")
10398
}
10499

105100
m := documentNode.(map[string]interface{})

schemaLoader_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,5 +172,5 @@ func TestParseSchemaURL_NotMap(t *testing.T) {
172172
_, err := NewSchema(sl)
173173
//THEN
174174
require.Error(t, err)
175-
assert.EqualError(t, err, "Expected: valid schema, given: Invalid JSON")
175+
assert.EqualError(t, err, "schema is invalid")
176176
}

0 commit comments

Comments
 (0)