gds-api-adapters 7.17.0 → 7.17.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gds_api/test_helpers/content_api.rb +2 -2
- data/lib/gds_api/version.rb +1 -1
- data/test/content_api_test.rb +3 -7
- metadata +4 -4
@@ -230,7 +230,7 @@ module GdsApi
|
|
230
230
|
stub_request(:get, %r{\A#{CONTENT_API_ENDPOINT}/business_support_schemes\.json}).to_return do |request|
|
231
231
|
if request.uri.query_values and request.uri.query_values["identifiers"]
|
232
232
|
ids = request.uri.query_values["identifiers"].split(',')
|
233
|
-
results = @stubbed_content_api_business_support_schemes.select {|bs| ids.include? bs["
|
233
|
+
results = @stubbed_content_api_business_support_schemes.select {|bs| ids.include? bs["identifier"] }
|
234
234
|
else
|
235
235
|
results = []
|
236
236
|
end
|
@@ -239,7 +239,7 @@ module GdsApi
|
|
239
239
|
end
|
240
240
|
|
241
241
|
def content_api_has_business_support_scheme(scheme)
|
242
|
-
raise "Need
|
242
|
+
raise "Need an identifier" if scheme["identifier"].nil?
|
243
243
|
@stubbed_content_api_business_support_schemes << scheme
|
244
244
|
end
|
245
245
|
|
data/lib/gds_api/version.rb
CHANGED
data/test/content_api_test.rb
CHANGED
@@ -553,15 +553,11 @@ describe GdsApi::ContentApi do
|
|
553
553
|
describe "test helpers" do
|
554
554
|
it "should have representative test helpers" do
|
555
555
|
setup_content_api_business_support_schemes_stubs
|
556
|
-
|
557
|
-
s1 = artefact_for_slug('scheme-1')
|
558
|
-
s1["details"].merge!("business_support_identifier" => "s1")
|
556
|
+
s1 = { "title" => "Scheme 1", "identifier" => "s1", "format" => "business_support" }
|
559
557
|
content_api_has_business_support_scheme(s1)
|
560
|
-
s2 =
|
561
|
-
s2["details"].merge!("business_support_identifier" => "s2")
|
558
|
+
s2 = { "title" => "Scheme 2", "identifier" => "s2", "format" => "business_support" }
|
562
559
|
content_api_has_business_support_scheme(s2)
|
563
|
-
s3 =
|
564
|
-
s3["details"].merge!("business_support_identifier" => "s3")
|
560
|
+
s3 = { "title" => "Scheme 3", "identifier" => "s3", "format" => "business_support" }
|
565
561
|
content_api_has_business_support_scheme(s3)
|
566
562
|
|
567
563
|
response = @api.business_support_schemes(['s1', 's3']).to_hash
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.17.
|
4
|
+
version: 7.17.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: plek
|
@@ -340,7 +340,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
340
340
|
version: '0'
|
341
341
|
segments:
|
342
342
|
- 0
|
343
|
-
hash:
|
343
|
+
hash: -187163505061002706
|
344
344
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
345
345
|
none: false
|
346
346
|
requirements:
|
@@ -349,7 +349,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
349
349
|
version: '0'
|
350
350
|
segments:
|
351
351
|
- 0
|
352
|
-
hash:
|
352
|
+
hash: -187163505061002706
|
353
353
|
requirements: []
|
354
354
|
rubyforge_project:
|
355
355
|
rubygems_version: 1.8.23
|