http_stub 0.13.5 → 0.14.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/lib/http_stub.rb +13 -4
  3. data/lib/http_stub/configurer.rb +9 -63
  4. data/lib/http_stub/configurer/deprecated_dsl.rb +57 -0
  5. data/lib/http_stub/configurer/request/stub.rb +7 -13
  6. data/lib/http_stub/configurer/request/stub_activator.rb +8 -4
  7. data/lib/http_stub/configurer/request/stub_activator_payload_builder.rb +25 -0
  8. data/lib/http_stub/configurer/request/stub_payload_builder.rb +44 -0
  9. data/lib/http_stub/configurer/server/buffered_command_processor.rb +24 -0
  10. data/lib/http_stub/configurer/server/command.rb +18 -0
  11. data/lib/http_stub/configurer/server/command_processor.rb +38 -0
  12. data/lib/http_stub/configurer/server/dsl.rb +56 -0
  13. data/lib/http_stub/configurer/server/facade.rb +57 -0
  14. data/lib/http_stub/configurer/server/request_processor.rb +30 -0
  15. data/lib/http_stub/models/registry.rb +4 -0
  16. data/lib/http_stub/models/stub.rb +2 -1
  17. data/lib/http_stub/models/stub_registry.rb +29 -0
  18. data/lib/http_stub/models/stub_triggers.rb +23 -0
  19. data/lib/http_stub/rake/server_tasks.rb +2 -5
  20. data/lib/http_stub/server.rb +14 -4
  21. data/lib/http_stub/version.rb +1 -1
  22. data/lib/http_stub/views/_stub.haml +7 -0
  23. data/spec/lib/http_stub/configurer/deprecated_dsl_spec.rb +232 -0
  24. data/spec/lib/http_stub/configurer/request/controllable_value_spec.rb +8 -8
  25. data/spec/lib/http_stub/configurer/request/omittable_spec.rb +8 -8
  26. data/spec/lib/http_stub/configurer/request/regexpable_spec.rb +14 -14
  27. data/spec/lib/http_stub/configurer/request/stub_activator_payload_builder_spec.rb +74 -0
  28. data/spec/lib/http_stub/configurer/request/stub_activator_spec.rb +19 -26
  29. data/spec/lib/http_stub/configurer/request/stub_payload_builder_spec.rb +203 -0
  30. data/spec/lib/http_stub/configurer/request/stub_spec.rb +18 -157
  31. data/spec/lib/http_stub/configurer/server/buffered_command_processor_spec.rb +35 -0
  32. data/spec/lib/http_stub/configurer/server/command_processor_integration_spec.rb +62 -0
  33. data/spec/lib/http_stub/configurer/server/command_spec.rb +25 -0
  34. data/spec/lib/http_stub/configurer/server/dsl_spec.rb +241 -0
  35. data/spec/lib/http_stub/configurer/server/facade_spec.rb +253 -0
  36. data/spec/lib/http_stub/configurer/server/request_processor_spec.rb +99 -0
  37. data/spec/lib/http_stub/configurer_integration_spec.rb +172 -122
  38. data/spec/lib/http_stub/configurer_spec.rb +4 -4
  39. data/spec/lib/http_stub/controllers/stub_activator_controller_spec.rb +25 -25
  40. data/spec/lib/http_stub/controllers/stub_controller_spec.rb +22 -22
  41. data/spec/lib/http_stub/hash_extensions_spec.rb +24 -24
  42. data/spec/lib/http_stub/models/exact_value_matcher_spec.rb +4 -4
  43. data/spec/lib/http_stub/models/hash_with_string_value_matchers_spec.rb +29 -29
  44. data/spec/lib/http_stub/models/headers_spec.rb +10 -10
  45. data/spec/lib/http_stub/models/omitted_value_matcher_spec.rb +8 -8
  46. data/spec/lib/http_stub/models/regexp_value_matcher_spec.rb +6 -6
  47. data/spec/lib/http_stub/models/registry_spec.rb +71 -28
  48. data/spec/lib/http_stub/models/request_header_parser_spec.rb +4 -4
  49. data/spec/lib/http_stub/models/request_pipeline_spec.rb +2 -2
  50. data/spec/lib/http_stub/models/response_spec.rb +38 -38
  51. data/spec/lib/http_stub/models/string_value_matcher_spec.rb +25 -25
  52. data/spec/lib/http_stub/models/stub_activator_spec.rb +15 -15
  53. data/spec/lib/http_stub/models/stub_headers_spec.rb +18 -18
  54. data/spec/lib/http_stub/models/stub_parameters_spec.rb +16 -16
  55. data/spec/lib/http_stub/models/stub_registry_integration_spec.rb +62 -0
  56. data/spec/lib/http_stub/models/stub_registry_spec.rb +152 -0
  57. data/spec/lib/http_stub/models/stub_spec.rb +67 -43
  58. data/spec/lib/http_stub/models/stub_triggers_spec.rb +64 -0
  59. data/spec/lib/http_stub/models/stub_uri_spec.rb +9 -9
  60. data/spec/lib/http_stub/rake/server_daemon_tasks_smoke_spec.rb +7 -7
  61. data/spec/lib/http_stub/rake/server_tasks_smoke_spec.rb +5 -5
  62. data/spec/lib/http_stub/rake/server_tasks_spec.rb +17 -15
  63. data/spec/lib/http_stub/server_daemon_spec.rb +16 -16
  64. data/spec/lib/http_stub/server_integration_spec.rb +112 -65
  65. data/spec/lib/http_stub/server_spec.rb +134 -96
  66. data/spec/spec_helper.rb +1 -1
  67. data/spec/support/http_stub/configurer/request/stub_payload_builder_shared_context.rb +27 -0
  68. data/spec/support/server_integration.rb +2 -2
  69. metadata +69 -30
  70. data/lib/http_stub/configurer/command.rb +0 -26
  71. data/lib/http_stub/configurer/command_processor.rb +0 -36
  72. data/lib/http_stub/configurer/impatient_command_chain.rb +0 -13
  73. data/lib/http_stub/configurer/patient_command_chain.rb +0 -25
  74. data/spec/lib/http_stub/configurer/command_processor_integration_spec.rb +0 -63
  75. data/spec/lib/http_stub/configurer/command_spec.rb +0 -40
  76. data/spec/lib/http_stub/configurer/impatient_command_chain_spec.rb +0 -17
  77. data/spec/lib/http_stub/configurer/patient_command_chain_spec.rb +0 -73
@@ -4,25 +4,25 @@ describe HttpStub::Configurer::Request::ControllableValue do
4
4
 
5
5
  let(:value) { "some value" }
6
6
 
7
- it "should format the potential control value via the Regexpable formatter" do
8
- HttpStub::Configurer::Request::Regexpable.should_receive(:format).with(value)
7
+ it "formats the potential control value via the Regexpable formatter" do
8
+ expect(HttpStub::Configurer::Request::Regexpable).to receive(:format).with(value)
9
9
 
10
10
  perform_format
11
11
  end
12
12
 
13
- it "should chain formatting by formatting the Regexpable formatter result via the Omittable formatter" do
13
+ it "chains formatting by formatting the Regexpable formatter result via the Omittable formatter" do
14
14
  regexp_formatted_value = "some regexp formatted value"
15
- HttpStub::Configurer::Request::Regexpable.stub(:format).and_return(regexp_formatted_value)
16
- HttpStub::Configurer::Request::Omittable.should_receive(:format).with(regexp_formatted_value)
15
+ allow(HttpStub::Configurer::Request::Regexpable).to receive(:format).and_return(regexp_formatted_value)
16
+ expect(HttpStub::Configurer::Request::Omittable).to receive(:format).with(regexp_formatted_value)
17
17
 
18
18
  perform_format
19
19
  end
20
20
 
21
- it "should return the Omittable formatter result" do
21
+ it "returns the Omittable formatter result" do
22
22
  omit_formatted_value = "some omit formatted value"
23
- HttpStub::Configurer::Request::Omittable.stub(:format).and_return(omit_formatted_value)
23
+ allow(HttpStub::Configurer::Request::Omittable).to receive(:format).and_return(omit_formatted_value)
24
24
 
25
- perform_format.should eql(omit_formatted_value)
25
+ expect(perform_format).to eql(omit_formatted_value)
26
26
  end
27
27
 
28
28
  def perform_format
@@ -13,13 +13,13 @@ describe HttpStub::Configurer::Request::Omittable do
13
13
  end
14
14
  end
15
15
 
16
- it "should return a hash containing the omitted values converted to 'control:omitted'" do
16
+ it "returns a hash containing the omitted values converted to 'control:omitted'" do
17
17
  expected_hash = (1..5).reduce({}) do |result, i|
18
18
  result["key#{i}"] = (i % 2 == 0) ? "value#{i}" : "control:omitted"
19
19
  result
20
20
  end
21
21
 
22
- perform_format.should eql(expected_hash)
22
+ expect(perform_format).to eql(expected_hash)
23
23
  end
24
24
 
25
25
  end
@@ -33,8 +33,8 @@ describe HttpStub::Configurer::Request::Omittable do
33
33
  end
34
34
  end
35
35
 
36
- it "should return the hash unchanged" do
37
- perform_format.should eql(value)
36
+ it "returns the hash unchanged" do
37
+ expect(perform_format).to eql(value)
38
38
  end
39
39
 
40
40
  end
@@ -43,8 +43,8 @@ describe HttpStub::Configurer::Request::Omittable do
43
43
 
44
44
  let(:value) { {} }
45
45
 
46
- it "should return the hash unchanged" do
47
- perform_format.should eql({})
46
+ it "returns the hash unchanged" do
47
+ expect(perform_format).to eql({})
48
48
  end
49
49
 
50
50
  end
@@ -55,8 +55,8 @@ describe HttpStub::Configurer::Request::Omittable do
55
55
 
56
56
  let(:value) { "not a hash" }
57
57
 
58
- it "should return the value unchanged" do
59
- perform_format.should eql(value)
58
+ it "returns the value unchanged" do
59
+ expect(perform_format).to eql(value)
60
60
  end
61
61
 
62
62
  end
@@ -6,8 +6,8 @@ describe HttpStub::Configurer::Request::Regexpable do
6
6
 
7
7
  let(:value) { "some string value" }
8
8
 
9
- it "should return the value unaltered" do
10
- HttpStub::Configurer::Request::Regexpable.format(value).should eql(value)
9
+ it "returns the value unaltered" do
10
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to eql(value)
11
11
  end
12
12
 
13
13
  end
@@ -16,20 +16,20 @@ describe HttpStub::Configurer::Request::Regexpable do
16
16
 
17
17
  let(:value) { /.+?[a-z]/ }
18
18
 
19
- it "should return a string prefixed by 'regexp:'" do
20
- HttpStub::Configurer::Request::Regexpable.format(value).should start_with("regexp:")
19
+ it "returns a string prefixed by 'regexp:'" do
20
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to start_with("regexp:")
21
21
  end
22
22
 
23
- it "should contain the regular expression converted to a string" do
24
- HttpStub::Configurer::Request::Regexpable.format(value).should end_with(".+?[a-z]")
23
+ it "contains the regular expression converted to a string" do
24
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to end_with(".+?[a-z]")
25
25
  end
26
26
 
27
27
  describe "and the regular expression contain escaped meta characters" do
28
28
 
29
29
  let(:value) { /\^\+\[/ }
30
30
 
31
- it "should return a string that retains the escape characters" do
32
- HttpStub::Configurer::Request::Regexpable.format(value).should include("\\^\\+\\[")
31
+ it "returns a string that retains the escape characters" do
32
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to include("\\^\\+\\[")
33
33
  end
34
34
 
35
35
  end
@@ -38,8 +38,8 @@ describe HttpStub::Configurer::Request::Regexpable do
38
38
 
39
39
  let(:value) { /\/some\/path/ }
40
40
 
41
- it "should represent the path separators as a single forward-slash" do
42
- HttpStub::Configurer::Request::Regexpable.format(value).should end_with("/some/path")
41
+ it "represents the path separators as a single forward-slash" do
42
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to end_with("/some/path")
43
43
  end
44
44
 
45
45
  end
@@ -52,10 +52,10 @@ describe HttpStub::Configurer::Request::Regexpable do
52
52
 
53
53
  let(:value) { { key1: "value1", key2: /^.*value2$/, key3: "value3" } }
54
54
 
55
- it "should return a json representation of the hash whose values are their regexpable form" do
55
+ it "returns a json representation of the hash whose values are their regexpable form" do
56
56
  expected_formatted_hash = {key1: "value1", key2: "regexp:^.*value2$", key3: "value3"}
57
57
 
58
- HttpStub::Configurer::Request::Regexpable.format(value).should eql(expected_formatted_hash)
58
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to eql(expected_formatted_hash)
59
59
  end
60
60
 
61
61
  end
@@ -64,8 +64,8 @@ describe HttpStub::Configurer::Request::Regexpable do
64
64
 
65
65
  let(:value) { {} }
66
66
 
67
- it "should return an empty hash" do
68
- HttpStub::Configurer::Request::Regexpable.format(value).should eql({})
67
+ it "returns an empty hash" do
68
+ expect(HttpStub::Configurer::Request::Regexpable.format(value)).to eql({})
69
69
  end
70
70
 
71
71
  end
@@ -0,0 +1,74 @@
1
+ describe HttpStub::Configurer::Request::StubActivatorPayloadBuilder do
2
+
3
+ include_context "stub payload builder arguments"
4
+
5
+ let(:stub_payload) { { "stub_payload_key" => "stub payload value" } }
6
+ let(:stub_builder) { instance_double(HttpStub::Configurer::Request::StubPayloadBuilder, build: stub_payload) }
7
+
8
+ let(:builder) { HttpStub::Configurer::Request::StubActivatorPayloadBuilder.new }
9
+
10
+ before(:example) do
11
+ allow(HttpStub::Configurer::Request::StubPayloadBuilder).to receive(:new).and_return(stub_builder)
12
+ end
13
+
14
+ describe "#match_request" do
15
+
16
+ it "delegates to a stub payload builder" do
17
+ expect(stub_builder).to receive(:match_request).with(uri, request_options)
18
+
19
+ builder.match_request(uri, request_options)
20
+ end
21
+
22
+ end
23
+
24
+ describe "#with_response" do
25
+
26
+ it "delegates to a stub payload builder" do
27
+ expect(stub_builder).to receive(:with_response).with(response_options)
28
+
29
+ builder.with_response(response_options)
30
+ end
31
+
32
+ end
33
+
34
+ describe "#and_add_stub" do
35
+
36
+ let(:trigger_builder) { instance_double(HttpStub::Configurer::Request::StubPayloadBuilder) }
37
+
38
+ it "delegates to a stub payload builder" do
39
+ expect(stub_builder).to receive(:and_add_stub).with(trigger_builder)
40
+
41
+ builder.and_add_stub(trigger_builder)
42
+ end
43
+
44
+ end
45
+
46
+ describe "#build" do
47
+
48
+ subject { builder.build }
49
+
50
+ context "when a path is established" do
51
+
52
+ let(:activation_uri) { "http://some/activation/uri" }
53
+
54
+ before(:example) { builder.path(activation_uri) }
55
+
56
+ it "returns a payload that includes the activation uri" do
57
+ expect(subject).to include(activation_uri: activation_uri)
58
+ end
59
+
60
+ it "builds a stub payload" do
61
+ expect(stub_builder).to receive(:build)
62
+
63
+ subject
64
+ end
65
+
66
+ it "returns a payload that includes the stub payload" do
67
+ expect(subject).to include(stub_payload)
68
+ end
69
+
70
+ end
71
+
72
+ end
73
+
74
+ end
@@ -2,47 +2,40 @@ describe HttpStub::Configurer::Request::StubActivator do
2
2
 
3
3
  describe "#initialize" do
4
4
 
5
- let(:stub_request_body) { { key: "value" }.to_json }
6
- let(:stub_request_content_type) { "Some content type" }
7
- let(:stub_request) { double("StubRequest", :content_type => stub_request_content_type, :body => stub_request_body) }
5
+ context "when provided a payload" do
8
6
 
9
- before(:each) { HttpStub::Configurer::Request::Stub.stub(:new).and_return(stub_request) }
7
+ let(:payload) { { payload_key: "payload value" } }
10
8
 
11
- describe "when provided an activation uri, stub uri and stub options" do
9
+ let(:request) { HttpStub::Configurer::Request::StubActivator.new(payload) }
12
10
 
13
- let(:activation_uri) { "Some activation URI" }
14
- let(:stub_uri) { "Some stub URI" }
15
- let(:stub_options) { "Some options" }
16
-
17
- let(:request) { HttpStub::Configurer::Request::StubActivator.new(activation_uri, stub_uri, stub_options) }
18
- let(:request_body) { JSON.parse(request.body) }
11
+ it "creates a HTTP POST request" do
12
+ expect(request.method).to eql("POST")
13
+ end
19
14
 
20
- it "should create a HTTP POST request" do
21
- request.method.should eql("POST")
15
+ it "submits the request to '/stubs/activators'" do
16
+ expect(request.path).to eql("/stubs/activators")
22
17
  end
23
18
 
24
- it "should submit the request to '/stubs/activators'" do
25
- request.path.should eql("/stubs/activators")
19
+ it "sets the content type to json" do
20
+ expect(request.content_type).to eql("application/json")
26
21
  end
27
22
 
28
- it "should set the content type to the same as a stub request" do
29
- request.content_type.should eql(stub_request_content_type)
23
+ it "sets the body to the JSON representation of the provided payload" do
24
+ expect(request.body).to eql(payload.to_json)
30
25
  end
31
26
 
32
- describe "generates a JSON body which" do
27
+ end
33
28
 
34
- it "should contain entries for a stub request" do
35
- HttpStub::Configurer::Request::Stub.should_receive(:new).with(stub_uri, stub_options).and_return(stub_request)
29
+ end
36
30
 
37
- request_body.should include(JSON.parse(stub_request_body))
38
- end
31
+ describe "#activation_uri" do
39
32
 
40
- it "should have an entry for the provided activation URI" do
41
- request_body.should include({ "activation_uri" => activation_uri })
42
- end
33
+ let(:activation_uri) { "http://some/activation/uri" }
43
34
 
44
- end
35
+ let(:request) { HttpStub::Configurer::Request::StubActivator.new(activation_uri: activation_uri) }
45
36
 
37
+ it "should return the activation uri from the payload" do
38
+ expect(request.activation_uri).to eql(activation_uri)
46
39
  end
47
40
 
48
41
  end
@@ -0,0 +1,203 @@
1
+ describe HttpStub::Configurer::Request::StubPayloadBuilder do
2
+
3
+ let(:builder) { HttpStub::Configurer::Request::StubPayloadBuilder.new }
4
+
5
+ shared_context "add stub triggers" do
6
+
7
+ let(:trigger_payloads) { (1..3).map { |i| { "trigger_#{i}_key" => "trigger #{i} value" } } }
8
+ let(:trigger_builders) do
9
+ trigger_payloads.map do |payload|
10
+ instance_double(HttpStub::Configurer::Request::StubPayloadBuilder, build: payload)
11
+ end
12
+ end
13
+
14
+ before(:example) { trigger_builders.each { |trigger_builder| builder.and_add_stub(trigger_builder) } }
15
+
16
+ end
17
+
18
+ describe "#build" do
19
+
20
+ context "when provided a uri and stub arguments" do
21
+
22
+ include_context "stub payload builder arguments"
23
+
24
+ subject { builder.build }
25
+
26
+ before(:example) do
27
+ allow(HttpStub::Configurer::Request::ControllableValue).to receive(:format)
28
+
29
+ builder.match_request(uri, request_options)
30
+ builder.with_response(response_options)
31
+ end
32
+
33
+ context "when request header is provided" do
34
+
35
+ it "formats the headers into control values" do
36
+ expect(HttpStub::Configurer::Request::ControllableValue).to receive(:format).with(request_headers)
37
+
38
+ subject
39
+ end
40
+
41
+ end
42
+
43
+ context "when no request header is provided" do
44
+
45
+ let(:request_headers) { nil }
46
+
47
+ it "formats an empty header hash" do
48
+ expect(HttpStub::Configurer::Request::ControllableValue).to receive(:format).with({})
49
+
50
+ subject
51
+ end
52
+
53
+ end
54
+
55
+ context "when a request parameter is provided" do
56
+
57
+ it "formats the request parameters into control values" do
58
+ expect(HttpStub::Configurer::Request::ControllableValue).to receive(:format).with(request_parameters)
59
+
60
+ subject
61
+ end
62
+
63
+ end
64
+
65
+ context "when no request parameter is provided" do
66
+
67
+ let(:request_parameters) { nil }
68
+
69
+ it "formats an empty parameter hash" do
70
+ expect(HttpStub::Configurer::Request::ControllableValue).to receive(:format).with({})
71
+
72
+ subject
73
+ end
74
+
75
+ end
76
+
77
+ context "when stub triggers are added" do
78
+
79
+ include_context "add stub triggers"
80
+
81
+ it "builds the payload for each trigger" do
82
+ trigger_builders.each { |trigger_builder| expect(trigger_builder).to receive(:build) }
83
+
84
+ subject
85
+ end
86
+
87
+ end
88
+
89
+ context "builds a request payload" do
90
+
91
+ it "has an entry containing the control value representation of the uri" do
92
+ allow(HttpStub::Configurer::Request::ControllableValue).to(
93
+ receive(:format).with(uri).and_return("uri as a string")
94
+ )
95
+
96
+ expect(subject).to include(uri: "uri as a string")
97
+ end
98
+
99
+ it "has an entry for the method option" do
100
+ expect(subject).to include(method: stub_method)
101
+ end
102
+
103
+ it "has an entry containing the string representation of the request headers" do
104
+ allow(HttpStub::Configurer::Request::ControllableValue).to(
105
+ receive(:format).with(request_headers).and_return("request headers as string")
106
+ )
107
+
108
+ expect(subject).to include(headers: "request headers as string")
109
+ end
110
+
111
+ it "has an entry containing the string representation of the request parameters" do
112
+ allow(HttpStub::Configurer::Request::ControllableValue).to(
113
+ receive(:format).with(request_parameters).and_return("request parameters as string")
114
+ )
115
+
116
+ expect(subject).to include(parameters: "request parameters as string")
117
+ end
118
+
119
+ context "when a status response argument is provided" do
120
+
121
+ it "has a response entry for the argument" do
122
+ expect(subject[:response]).to include(status: response_status)
123
+ end
124
+
125
+ end
126
+
127
+ context "when no status response argument is provided" do
128
+
129
+ let(:response_status) { nil }
130
+
131
+ it "has a response entry with an empty status code" do
132
+ expect(subject[:response]).to include(status: "")
133
+ end
134
+
135
+ end
136
+
137
+ context "when response headers are provided" do
138
+
139
+ let(:response_headers) { { response_header_name: "value" } }
140
+
141
+ it "has a headers response entry containing the the provided headers" do
142
+ expect(subject[:response]).to include(headers: response_headers)
143
+ end
144
+
145
+ end
146
+
147
+ context "when response headers are omitted" do
148
+
149
+ let (:response_headers) { nil }
150
+
151
+ it "has a headers response entry containing an empty hash" do
152
+ expect(subject[:response]).to include(headers: {})
153
+ end
154
+
155
+ end
156
+
157
+ it "has an entry for the response body argument" do
158
+ expect(subject[:response]).to include(body: response_body)
159
+ end
160
+
161
+ context "when a delay option is provided" do
162
+
163
+ it "has a response entry for the argument" do
164
+ expect(subject[:response]).to include(delay_in_seconds: response_delay_in_seconds)
165
+ end
166
+
167
+ end
168
+
169
+ context "when a delay option is omitted" do
170
+
171
+ let(:response_delay_in_seconds) { nil }
172
+
173
+ it "has a response entry with an empty delay" do
174
+ expect(subject[:response]).to include(delay_in_seconds: "")
175
+ end
176
+
177
+ end
178
+
179
+ context "when stub triggers are added" do
180
+
181
+ include_context "add stub triggers"
182
+
183
+ it "has a triggers entry containing the stub trigger payloads" do
184
+ expect(subject).to include(triggers: trigger_payloads)
185
+ end
186
+
187
+ end
188
+
189
+ context "when no stub triggers are added" do
190
+
191
+ it "has a triggers entry containing an empty hash" do
192
+ expect(subject).to include(triggers: [])
193
+ end
194
+
195
+ end
196
+
197
+ end
198
+
199
+ end
200
+
201
+ end
202
+
203
+ end