quiz_api_client 4.9.0 → 4.9.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 512285775df9e9cc2a4e382f25dcf87847f4bf7b73daa98f78681aa847ad3979
|
4
|
+
data.tar.gz: 9a8208b7abe38315baac2adfbf2e7b38ebc23e11d81d79b61b8360a65f5c9bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72acb2a511704dfccb3b205f12c0cfe5998b6c2c3bd9667955c5a3978856e5940df63d8387c18249a368637cda35005f20ada66bbdfede72db0457985f52957d
|
7
|
+
data.tar.gz: 532c4634204b44b0a672bf975ef6f7c7ad2fac7cef39116dc4fe9c46b44b5a68b7016618a987be9819bcbc2fc97a56596d841bf3db0711846a166af7b139267b
|
@@ -15,7 +15,7 @@ module QuizApiClient::Services
|
|
15
15
|
|
16
16
|
def update(params:, token: nil)
|
17
17
|
raise 'Quiz Id Required' unless params && params[:quiz_id]
|
18
|
-
raise 'Entry Id Required' unless params[:
|
18
|
+
raise 'Entry Id Required' unless params[:id]
|
19
19
|
|
20
20
|
put_to_quiz_api(params: params, token: token)
|
21
21
|
end
|
@@ -51,7 +51,7 @@ module QuizApiClient::Services
|
|
51
51
|
|
52
52
|
def put_to_quiz_api(params:, token:)
|
53
53
|
client(token: token).put(
|
54
|
-
"/api/quizzes/#{params[:quiz_id]}/quiz_entries/#{params[:
|
54
|
+
"/api/quizzes/#{params[:quiz_id]}/quiz_entries/#{params[:id]}",
|
55
55
|
quiz_entry: params
|
56
56
|
)
|
57
57
|
end
|
@@ -74,9 +74,9 @@ describe QuizApiClient::Services::QuizEntriesService do
|
|
74
74
|
end
|
75
75
|
|
76
76
|
describe '#update' do
|
77
|
-
let(:params) { { quiz_id: 1,
|
77
|
+
let(:params) { { quiz_id: 1, id: 1, points_possible: 1 } }
|
78
78
|
let(:stubbed_response) { { 'id' => 1, 'entry' => { 'id' => 1 } } }
|
79
|
-
let(:expected_url) { "https://#{host}/api/quizzes/#{params[:quiz_id]}/quiz_entries/#{params[:
|
79
|
+
let(:expected_url) { "https://#{host}/api/quizzes/#{params[:quiz_id]}/quiz_entries/#{params[:id]}" }
|
80
80
|
let(:status_code) { 200 }
|
81
81
|
before do
|
82
82
|
stub_request(:put, expected_url)
|
@@ -87,7 +87,7 @@ describe QuizApiClient::Services::QuizEntriesService do
|
|
87
87
|
)
|
88
88
|
end
|
89
89
|
|
90
|
-
it 'puts to quiz_api/api/quizzes/{quiz_id}/quiz_entries/{
|
90
|
+
it 'puts to quiz_api/api/quizzes/{quiz_id}/quiz_entries/{id} and returns the response' do
|
91
91
|
result = subject.update(params: params, token: 'token')
|
92
92
|
expect(result.parsed_response).to eql(stubbed_response)
|
93
93
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quiz_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.9.
|
4
|
+
version: 4.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Slaughter
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: exe
|
17
17
|
cert_chain: []
|
18
|
-
date: 2023-03-
|
18
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: httparty
|