Skip to content

Commit

Permalink
=== WIP ===
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Aug 23, 2016
1 parent 1e7be7d commit f1c852a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/cucumber/step_definitions/body_steps.coffee
@@ -1,13 +1,18 @@

module.exports = ->
@Given /^you define expected HTTP body using the following "([^"]*)":$/, (type, body, callback) ->
if type == "textual example"
if type == 'JSON schema'
@expected.bodySchema = JSON.parse(body)
else
@expected.body = body
else if type == "JSON example"
@expected.body = body
else if type == "JSON schema"
@expected.bodySchema = JSON.parse body
callback()

@Given /^you define expected HTTP body as empty$/, (callback) ->
@expected.body = ''
callback()

@Given /^real HTTP body is empty$/, (callback) ->
@real.body = ''
callback()

@When /^real HTTP body is following:$/, (body, callback) ->
Expand Down

0 comments on commit f1c852a

Please sign in to comment.