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 +4 -4
- data/lib/cucumber-rest-bdd/steps/status.rb +45 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d4817da527612ba7905db64bb40230f53e4f99247857156a300119d8cbb321b
|
4
|
+
data.tar.gz: 4b577d2a8fc763b96f40e8a64e9381bfb9c5e116f59234e8fe1f4ae3e707c01e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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 )
|
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
|
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 )
|
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 )
|
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
|
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
|
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 )
|
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.
|
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-
|
12
|
+
date: 2018-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cucumber-api
|