Skip to content

Commit

Permalink
Merge pull request #1030 from alphagov/add-link-status-to-local-links…
Browse files Browse the repository at this point in the history
…-manager-api

Add link status to Local Links Manager API
  • Loading branch information
gclssvglx authored Jan 25, 2021
2 parents 532b822 + 1aa51f7 commit 164a1fc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 69.3.0

* Update the local links manager adapter stubs to include the link status - defaults to `ok`

# 69.2.0

* Remove unused email unpublish adapter
Expand Down
3 changes: 2 additions & 1 deletion lib/gds_api/test_helpers/local_links_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module TestHelpers
module LocalLinksManager
LOCAL_LINKS_MANAGER_ENDPOINT = Plek.current.find("local-links-manager")

def stub_local_links_manager_has_a_link(authority_slug:, lgsl:, lgil:, url:, country_name: "England")
def stub_local_links_manager_has_a_link(authority_slug:, lgsl:, lgil:, url:, country_name: "England", status: "ok")
response = {
"local_authority" => {
"name" => authority_slug.capitalize,
Expand All @@ -18,6 +18,7 @@ def stub_local_links_manager_has_a_link(authority_slug:, lgsl:, lgil:, url:, cou
"lgsl_code" => lgsl,
"lgil_code" => lgil,
"url" => url,
"status" => status,
},
}

Expand Down
2 changes: 1 addition & 1 deletion lib/gds_api/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module GdsApi
VERSION = "69.2.0".freeze
VERSION = "69.3.0".freeze
end
2 changes: 2 additions & 0 deletions test/local_links_manager_api_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
lgil: 4,
url: "http://blackburn.example.com/abandoned-shopping-trolleys/report",
country_name: "England",
status: "ok",
)

expected_response = {
Expand All @@ -33,6 +34,7 @@
"lgsl_code" => 2,
"lgil_code" => 4,
"url" => "http://blackburn.example.com/abandoned-shopping-trolleys/report",
"status" => "ok",
},
}

Expand Down

0 comments on commit 164a1fc

Please sign in to comment.