alinta-cucumber-rest-bdd 0.5.20 → 0.5.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbffb705889af8cb87393b7617f1c084c145c31ce37851e0bcbd83f99827bf86
4
- data.tar.gz: 859abac39ab824a2386976b85badae3a9d60920bd511f917b1b308bc8c04ef6e
3
+ metadata.gz: 8d4817da527612ba7905db64bb40230f53e4f99247857156a300119d8cbb321b
4
+ data.tar.gz: 4b577d2a8fc763b96f40e8a64e9381bfb9c5e116f59234e8fe1f4ae3e707c01e
5
5
  SHA512:
6
- metadata.gz: 3281d942a833aa3dcd689e53aa394e267a58b782632b544d93026bf2dc81d55b516fcf007772a4fde0ff5a9d71ec90b7298f46ac1a599be99aa0e8f77c4517c4
7
- data.tar.gz: 2d9eaa3ed011778ef147668e16b7abaa3c9a16ccf9d04d3e6d3bb2da70a0622c4563dbdf278f792969b3221faaec21a2922837dfe7e04f9c7586b017924492f8
6
+ metadata.gz: 69d8d333bf464587c6faf064fa4c05e1dc6373642b3b4debf6c7729633534e5e76735cc8a9bafefa631bf45311458f55e7ec2a52f2b5bf7f0c0c6c301d58a0e5
7
+ data.tar.gz: 9b6c316017b64b1a984f94f7923e2d7064fcc06ba2957fd3097b4cd674fe89703ee914ddfe62365131670e71bc911451fad4661d323749df4e58ab0e51d0384e
@@ -20,7 +20,11 @@ Then("the request fail(s/ed)") do
20
20
  raise %/Expected failed response code 4xx\/5xx but was #{@response.code}/ if @response.code < 400 || @response.code >= 600
21
21
  end
22
22
 
23
- Then("the request is/was successful and a/the resource/{item_type} is/was created") do | item_type |
23
+ Then("the request is/was successful and a/the resource is/was created") do
24
+ steps %Q{Then the response status should be "201"}
25
+ end
26
+
27
+ Then("the request is/was successful and a/the {item_type} is/was created") do | item_type |
24
28
  steps %Q{Then the response status should be "201"}
25
29
  end
26
30
 
@@ -33,34 +37,66 @@ Then("the request is/was successful and (an )empty/blank/no response body is/was
33
37
  raise %/Expected the request body to be empty/ if !@response.body.empty?
34
38
  end
35
39
 
36
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was invalid") do | item_type |
40
+ Then("the request fail(s/ed) because (the )it/resource is/was invalid") do
37
41
  steps %Q{Then the response status should be "400"}
38
42
  end
39
43
 
40
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was/am/are unauthorised/unauthorized") do | item_type |
44
+ Then("the request fail(s/ed) because (the ){item_type} is/was invalid") do | item_type |
45
+ steps %Q{Then the response status should be "400"}
46
+ end
47
+
48
+ Then("the request fail(s/ed) because (the )it/resource is/was/am/are unauthorised/unauthorized") do
49
+ steps %Q{Then the response status should be "401"}
50
+ end
51
+
52
+ Then("the request fail(s/ed) because (the ){item_type} is/was/am/are unauthorised/unauthorized") do | item_type |
41
53
  steps %Q{Then the response status should be "401"}
42
54
  end
43
55
 
44
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was forbidden") do | item_type |
56
+ Then("the request fail(s/ed) because (the )it/resource is/was forbidden") do
45
57
  steps %Q{Then the response status should be "403"}
46
58
  end
47
59
 
48
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was not found") do | item_type |
60
+ Then("the request fail(s/ed) because (the ){item_type} is/was forbidden") do | item_type |
61
+ steps %Q{Then the response status should be "403"}
62
+ end
63
+
64
+ Then("the request fail(s/ed) because (the )it/resource is/was not found") do
49
65
  steps %Q{Then the response status should be "404"}
50
66
  end
51
67
 
52
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was not allowed") do
68
+ Then("the request fail(s/ed) because (the ){item_type} is/was not found") do | item_type |
69
+ steps %Q{Then the response status should be "404"}
70
+ end
71
+
72
+ Then("the request fail(s/ed) because (the )it/resource is/was not allowed") do
73
+ steps %Q{Then the response status should be "405"}
74
+ end
75
+
76
+ Then("the request fail(s/ed) because (the ){item_type} is/was not allowed") do | item_type |
53
77
  steps %Q{Then the response status should be "405"}
54
78
  end
55
79
 
56
- Then("the request fail(s/ed) because there is/was/has a conflict( with {item_type})") do | item_type |
80
+ Then("the request fail(s/ed) because there is/was/has a conflict") do
81
+ steps %Q{Then the response status should be "409"}
82
+ end
83
+
84
+ Then("the request fail(s/ed) because there is/was/has a conflict with {item_type}") do | item_type |
57
85
  steps %Q{Then the response status should be "409"}
58
86
  end
59
87
 
60
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was/has gone") do | item_type |
88
+ Then("the request fail(s/ed) because (the )it/resource is/was/has gone") do
61
89
  steps %Q{Then the response status should be "410"}
62
90
  end
63
91
 
64
- Then("the request fail(s/ed) because (the )it/resource/{item_type} is/was not implemented") do | item_type |
92
+ Then("the request fail(s/ed) because (the ){item_type} is/was/has gone") do | item_type |
93
+ steps %Q{Then the response status should be "410"}
94
+ end
95
+
96
+ Then("the request fail(s/ed) because (the )it/resource is/was not implemented") do
97
+ steps %Q{Then the response status should be "501"}
98
+ end
99
+
100
+ Then("the request fail(s/ed) because (the ){item_type} is/was not implemented") do | item_type |
65
101
  steps %Q{Then the response status should be "501"}
66
102
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alinta-cucumber-rest-bdd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.20
4
+ version: 0.5.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Bragg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-04-17 00:00:00.000000000 Z
12
+ date: 2018-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber-api