gds-api-adapters 81.0.1 → 81.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/test_helpers/local_links_manager.rb +10 -4
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a24005bab2921edb7aa53883b108f6e41d924fad73427f83a36e8533e7812d04
|
4
|
+
data.tar.gz: f31d0c3901757454cc2cb2bc9a25f37bf75478d49f1897df0f49d7b9618d0100
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dab28218b95c40c9220630b17aef48d0a97d9c6d20a436a2006114e23269cf3932f152becd2735f539a812cfa698b39b54da9ba707ccb475014164a12a16f6e7
|
7
|
+
data.tar.gz: 5df20ac4342d9ba55ef43c8e83731d78f24205a96c48f05803d84cc8ea7d04c33886c67547d5f8dd06804f4c55665f3192cb30be367063d9af77c851c2898e54
|
@@ -98,13 +98,13 @@ module GdsApi
|
|
98
98
|
parameters
|
99
99
|
end
|
100
100
|
|
101
|
-
def stub_local_links_manager_has_a_local_authority(authority_slug, local_custodian_code: nil)
|
101
|
+
def stub_local_links_manager_has_a_local_authority(authority_slug, country_name: "England", local_custodian_code: nil)
|
102
102
|
response = {
|
103
103
|
"local_authorities" => [
|
104
104
|
{
|
105
105
|
"name" => authority_slug.capitalize,
|
106
106
|
"homepage_url" => "http://#{authority_slug}.example.com",
|
107
|
-
"country_name" =>
|
107
|
+
"country_name" => country_name,
|
108
108
|
"tier" => "unitary",
|
109
109
|
"slug" => authority_slug,
|
110
110
|
},
|
@@ -177,13 +177,13 @@ module GdsApi
|
|
177
177
|
.to_return(body: {}.to_json, status: 404)
|
178
178
|
end
|
179
179
|
|
180
|
-
def stub_local_links_manager_has_a_local_authority_without_homepage(authority_slug)
|
180
|
+
def stub_local_links_manager_has_a_local_authority_without_homepage(authority_slug, country_name: "England", local_custodian_code: nil)
|
181
181
|
response = {
|
182
182
|
"local_authorities" => [
|
183
183
|
{
|
184
184
|
"name" => authority_slug.capitalize,
|
185
185
|
"homepage_url" => "",
|
186
|
-
"country_name" =>
|
186
|
+
"country_name" => country_name,
|
187
187
|
"tier" => "unitary",
|
188
188
|
"slug" => authority_slug,
|
189
189
|
},
|
@@ -193,6 +193,12 @@ module GdsApi
|
|
193
193
|
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/local-authority")
|
194
194
|
.with(query: { authority_slug: authority_slug })
|
195
195
|
.to_return(body: response.to_json, status: 200)
|
196
|
+
|
197
|
+
unless local_custodian_code.nil?
|
198
|
+
stub_request(:get, "#{LOCAL_LINKS_MANAGER_ENDPOINT}/api/local-authority")
|
199
|
+
.with(query: { local_custodian_code: local_custodian_code })
|
200
|
+
.to_return(body: response.to_json, status: 200)
|
201
|
+
end
|
196
202
|
end
|
197
203
|
end
|
198
204
|
end
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 81.0.
|
4
|
+
version: 81.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|