module GdsApi::TestHelpers::SupportApi

def stub_organisations_list(response_body = nil)

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