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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8fca55d695f003f76bfe73bdec79add86ab4a2b25efadedf0f25690f54c20d4f
4
- data.tar.gz: 12f119f94ca114d7b2c3ae3eab96554c2ec84d3cbac61c2bb8d0a502e006d022
3
+ metadata.gz: a24005bab2921edb7aa53883b108f6e41d924fad73427f83a36e8533e7812d04
4
+ data.tar.gz: f31d0c3901757454cc2cb2bc9a25f37bf75478d49f1897df0f49d7b9618d0100
5
5
  SHA512:
6
- metadata.gz: 126f6602485893e0a6fd0731ecc579f575d2d2516f0d47a4ee23029c2bcfd0ef20750b97f01fee5a70187587ea399c6e602be69b8ddca273af1cae831cd4808d
7
- data.tar.gz: 2bab839794240cfd0b23a04f36c0a4395377e5fd765f4548a844ce27ec868bf58055059046499ddd862dadbb3a6a9e360dd59f215e5eb1f469f8a17e6f7f3eba
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" => "England",
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" => "England",
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
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "81.0.1".freeze
2
+ VERSION = "81.0.2".freeze
3
3
  end
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.1
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-25 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable