fizzy-api 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fizzy/api/endpoints/calculate_outcome.rb +2 -2
- data/lib/fizzy/api/version.rb +1 -1
- data/spec/fizzy/api/endpoints/calculate_outcome_spec.rb +1 -1
- data/spec/fizzy/api/endpoints/render_graph_spec.rb +1 -1
- data/spec/fizzy/api/endpoints/render_graph_synchronous_spec.rb +1 -1
- data/spec/fizzy/api/endpoints/render_overview_spec.rb +1 -1
- data/spec/support/httparty_helpers.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a07dd155550446cb1c0c0e83a0b40fbe5781553
|
4
|
+
data.tar.gz: 0c677160447452b4682d5aecf8296b5cceb55ef3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ca443c0b0c0b641c7aa14da7c9dc5c826501a17a786ac5fdd8d08168be56a09368f805ad0a04f5dcce4fad4337c1d80d94babab67aff1e06beb3aa58da9aec
|
7
|
+
data.tar.gz: af5cd0a61c468847880e65a3f265b7c2172ec0f22b857aa94008ad08dfb991097f252572c382c2bc490d8b861db303ebbd74f6450bef3f2ea59a2187297365b8
|
data/Gemfile.lock
CHANGED
@@ -18,9 +18,9 @@ module Fizzy
|
|
18
18
|
case response.code
|
19
19
|
when 202
|
20
20
|
raise(Errors::OutcomeNotAvailableError,
|
21
|
-
select_measurement_text(response
|
21
|
+
select_measurement_text(response, 'The results are currently being calculated.'))
|
22
22
|
when 404
|
23
|
-
raise Errors::GraphNotFoundError, select_measurement_text(response
|
23
|
+
raise Errors::GraphNotFoundError, select_measurement_text(response,
|
24
24
|
'Participant not found, or graph not supported.')
|
25
25
|
else
|
26
26
|
raise Errors::UnexpectedStatusError, "Status code #{response.code} not expected."
|
data/lib/fizzy/api/version.rb
CHANGED
@@ -6,7 +6,7 @@ module Fizzy
|
|
6
6
|
describe CalculateOutcome do
|
7
7
|
let(:dossier_id) { '123' }
|
8
8
|
let(:protocol_subscription_id) { 'abc' }
|
9
|
-
let(:response) { httparty_response('') }
|
9
|
+
let(:response) { httparty_response('body') }
|
10
10
|
let(:session) { FactoryGirl.build :basic_auth_session }
|
11
11
|
|
12
12
|
it_behaves_like 'an endpoint'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
def httparty_response(response_data)
|
2
|
-
|
3
|
-
allow(
|
4
|
-
allow(
|
5
|
-
response_data
|
2
|
+
response = double('reponse')
|
3
|
+
allow(response).to receive(:body).and_return response_data
|
4
|
+
allow(response).to receive(:code).and_return 200
|
5
|
+
allow(response).to receive(:parsed_response).and_return response_data
|
6
|
+
response
|
6
7
|
end
|