tshield 0.11.6.0 → 0.11.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tshield/request_matching.rb +4 -1
- data/lib/tshield/version.rb +1 -1
- data/spec/tshield/request_matching_spec.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd161c62a3f2ed18d05c36ba7bacfff84a96f92fa7460d9702611af7ac60f33a
|
4
|
+
data.tar.gz: 046ff96f18c8504bce45c7cac21457b75fe46c6f836031279ec481e1e6a4a44c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce930e5ee1b0a6964c1e6a4255236fb4925fbc87779729aefdc594016a2d71d69afd2ad5b7ada1083314fb2eab8aefb9ce121181f44b2b2a0e957edf10a277bb
|
7
|
+
data.tar.gz: 585dc9bf34107431b2d93cfc46fe92ef2584f4614d0de9c82a41659f855e374a88cc441b4eedfabffa79aa1b4f17151594f98f4ef0daaa3f095a7ce688eef7de
|
data/lib/tshield/version.rb
CHANGED
@@ -131,7 +131,7 @@ describe TShield::RequestMatching do
|
|
131
131
|
context 'on match have multiples responses' do
|
132
132
|
before :each do
|
133
133
|
@responses = []
|
134
|
-
|
134
|
+
3.times.each do |time|
|
135
135
|
@responses << TShield::RequestMatching
|
136
136
|
.new('/matching/twice',
|
137
137
|
method: 'GET',
|
@@ -152,6 +152,13 @@ describe TShield::RequestMatching do
|
|
152
152
|
expect(response.headers).to eql('try' => 2)
|
153
153
|
expect(response.status).to eql(201)
|
154
154
|
end
|
155
|
+
|
156
|
+
it 'should return first response object in third call' do
|
157
|
+
response = @responses[2]
|
158
|
+
expect(response.body).to eql('first call')
|
159
|
+
expect(response.headers).to eql('try' => 1)
|
160
|
+
expect(response.status).to eql(200)
|
161
|
+
end
|
155
162
|
end
|
156
163
|
context 'on not match' do
|
157
164
|
before :each do
|