Module: GdsApi::TestHelpers::WhitehallAdminApi

Defined in:
lib/gds_api/test_helpers/whitehall_admin_api.rb

Constant Summary collapse

WHITEHALL_ADMIN_API_ENDPOINT =
"#{Plek.current.find('whitehall-admin')}/government/admin/api".freeze

Instance Method Summary collapse

Instance Method Details

#assert_whitehall_received_reindex_request_for(slug) ⇒ Object


10
11
12
13
14
15
# File 'lib/gds_api/test_helpers/whitehall_admin_api.rb', line 10

def assert_whitehall_received_reindex_request_for(slug)
  assert_requested(
    :post,
    "#{WHITEHALL_ADMIN_API_ENDPOINT}/reindex-specialist-sector-editions/#{slug}"
  )
end

#stub_all_whitehall_admin_api_requestsObject


6
7
8
# File 'lib/gds_api/test_helpers/whitehall_admin_api.rb', line 6

def stub_all_whitehall_admin_api_requests
  stub_request(:any, %r|^#{WHITEHALL_ADMIN_API_ENDPOINT}|)
end