Skip to content

Commit

Permalink
added prepareHeaders call for @expected data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tully committed Sep 24, 2013
1 parent 426fc56 commit 9c9c4a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "gavel",
"version": "0.2.0",
"description": "Gavel HTTP validator JavaScript library",
"main": "lib/gavel.js",
"main": "src/gavel.coffee",
"directories": {
"test": "test"
},
Expand Down
4 changes: 2 additions & 2 deletions src/validators/headers-json-example.coffee
Expand Up @@ -23,7 +23,7 @@ class HeadersJsonExample
@expected = JSON.parse(JSON.stringify(@expected))
catch error
outError = new errors.MalformedDataError "Headers validator - Expected malformed:" + error.message
outError['data'] = @expected
@expected = @prepareHeaders JSON.parse(JSON.stringify(@expected))
throw outError

try
Expand All @@ -44,7 +44,7 @@ class HeadersJsonExample

@validator = new JsonSchema @real, @schema

#calls validation for given data
#calls validation for given dataHeadersJsonExample
validate: () ->
@output = @validator.validate()

Expand Down

0 comments on commit 9c9c4a6

Please sign in to comment.