module GdsApi::TestHelpers::SupportApi

def stub_support_api_organisation(slug = "cabinet-office", response_body = nil)

def stub_support_api_organisation(slug = "cabinet-office", response_body = nil)
  response_body ||= {
    slug:,
    web_url: "https://www.gov.uk/government/organisations/#{slug}",
    title: "Cabinet Office",
    acronym: "CO",
    govuk_status: "live",
  }
  stub_http_request(:get, "#{SUPPORT_API_ENDPOINT}/organisations/#{slug}")
    .to_return(status: 200, body: response_body.to_json)
end