Skip to content

Commit

Permalink
Merge pull request #86 from bystro/fix-83-bdd-tests
Browse files Browse the repository at this point in the history
FIX #83 BDD scenarios update
  • Loading branch information
shouze authored Nov 28, 2017
2 parents bc883ec + 6665f54 commit 6ba4943
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
10 changes: 9 additions & 1 deletion features/bootstrap/fixtures/json-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@
"type": "string",
"required": true
},
"foofoo": {
"footrue": {
"type": "boolean",
"required": true
},
"foofalse": {
"type": "boolean",
"required": true
},
"foonull": {
"type": "null",
"required": true
},
"fooint": {
"type": "integer",
"required": true
Expand Down
27 changes: 22 additions & 5 deletions features/json_inspection.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@json_inspection
Feature: Test json inspection payload
In order to verify my json response
As a developper
Expand All @@ -8,7 +9,9 @@ Feature: Test json inspection payload
"""
{
"foo": "bar",
"foofoo": true,
"footrue": true,
"foofalse": false,
"foonull": null,
"fooint": 1337,
"foos": [
{"foo": "bar", "bar": "bar"},
Expand All @@ -26,7 +29,9 @@ Feature: Test json inspection payload

Scenario: Json nodes should be equal to specific values
Then the JSON node "foo" should be equal to "bar"
And the JSON node "foofoo" should be equal to "true"
And the JSON node "footrue" should be equal to "true"
And the JSON node "foofalse" should be equal to "false"
And the JSON node "foonull" should be equal to "null"
And the JSON node "fooint" should be equal to "1337"
And the JSON node "foos[0].foo" should be equal to "bar"
And the JSON node "fooo.foo" should be equal to "bar"
Expand All @@ -53,7 +58,9 @@ Feature: Test json inspection payload

Scenario: Json nodes should exist
Then the JSON node "foo" should exist
And the JSON node "foofoo" should exist
And the JSON node "footrue" should exist
And the JSON node "foofalse" should exist
And the JSON node "foonull" should exist
And the JSON node "fooint" should exist
And the JSON node "foos[0].foo" should exist
And the JSON node "foos" should exist
Expand All @@ -80,10 +87,18 @@ Feature: Test json inspection payload
"type": "string",
"required": true
},
"foofoo": {
"footrue": {
"type": "boolean",
"required": true
},
"foofalse": {
"type": "boolean",
"required": true
},
"foonull": {
"type": "null",
"required": true
},
"fooint": {
"type": "integer",
"required": true
Expand All @@ -108,7 +123,9 @@ Feature: Test json inspection payload
"""
{
"foo": "bar",
"foofoo": true,
"footrue": true,
"foofalse": false,
"foonull": null,
"fooint": 1337,
"foos": [
{"foo": "bar", "bar": "bar"},
Expand Down

0 comments on commit 6ba4943

Please sign in to comment.