optimus_prime 3.1.1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/optimus_prime/server.rb +6 -0
- data/lib/optimus_prime/version.rb +1 -1
- data/optimus_prime.log +2109 -0
- data/spec/lib/optimus_prime_spec.rb +21 -0
- metadata +2 -2
@@ -85,6 +85,27 @@ describe OptimusPrime do
|
|
85
85
|
|
86
86
|
end
|
87
87
|
|
88
|
+
%w{ get post put patch }.each do |request_method|
|
89
|
+
it "does not return the #{request_method} body when status code is 404" do
|
90
|
+
op.prime("error404", { username: "Test" }.to_json, content_type: :json, status_code: 404)
|
91
|
+
|
92
|
+
response = ::Faraday.send(request_method, 'http://localhost:7003/get/error404')
|
93
|
+
|
94
|
+
expect( response.body ).to eq("")
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
%w{ get post put patch }.each do |request_method|
|
99
|
+
it "does not return the #{request_method} body when status code is 500" do
|
100
|
+
op.prime("error500", { username: "Test" }.to_json, content_type: :json, status_code: 500)
|
101
|
+
|
102
|
+
response = ::Faraday.send(request_method, 'http://localhost:7003/get/error500')
|
103
|
+
|
104
|
+
expect( response.body ).to eq("")
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
|
88
109
|
context "Server processing" do
|
89
110
|
|
90
111
|
it "#GET tells the server to sleep for 10 seconds in order to reproduce timeouts" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: optimus_prime
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antonio Nalesso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|