Module: PublishingPlatformApi::TestHelpers::Search
- Defined in:
- lib/publishing_platform_api/test_helpers/search.rb
Constant Summary collapse
- SEARCH_ENDPOINT =
PublishingPlatformLocation.find("search-api")
Instance Method Summary collapse
Instance Method Details
#stub_any_search ⇒ Object
6 7 8 |
# File 'lib/publishing_platform_api/test_helpers/search.rb', line 6 def stub_any_search stub_request(:get, %r{#{SEARCH_ENDPOINT}/search.json}) end |
#stub_any_search_to_return_no_results ⇒ Object
10 11 12 |
# File 'lib/publishing_platform_api/test_helpers/search.rb', line 10 def stub_any_search_to_return_no_results stub_any_search.to_return(body: { results: [] }.to_json) end |