Module: GovukConditionalContentItemLoaderTestHelpers
- Includes:
- GdsApi::TestHelpers::ContentStore, GdsApi::TestHelpers::PublishingApi
- Defined in:
- lib/govuk_content_item_loader/test_helpers.rb
Instance Method Summary collapse
- #stub_conditional_content_loader_has_gone_item(base_path) ⇒ Object
- #stub_conditional_content_loader_isnt_available ⇒ Object
- #stub_conditional_loader_does_not_return_content_item_for_path(base_path, options = {}) ⇒ Object
- #stub_conditional_loader_returns_content_item_for_path(base_path, body = content_item_for_base_path(base_path), options = {}) ⇒ Object
Instance Method Details
#stub_conditional_content_loader_has_gone_item(base_path) ⇒ Object
24 25 26 27 |
# File 'lib/govuk_content_item_loader/test_helpers.rb', line 24 def stub_conditional_content_loader_has_gone_item(base_path) stub_content_store_has_gone_item(base_path) stub_publishing_api_graphql_has_gone_item(base_path) end |
#stub_conditional_content_loader_isnt_available ⇒ Object
19 20 21 22 |
# File 'lib/govuk_content_item_loader/test_helpers.rb', line 19 def stub_conditional_content_loader_isnt_available stub_content_store_isnt_available stub_publishing_api_isnt_available end |
#stub_conditional_loader_does_not_return_content_item_for_path(base_path, options = {}) ⇒ Object
14 15 16 17 |
# File 'lib/govuk_content_item_loader/test_helpers.rb', line 14 def stub_conditional_loader_does_not_return_content_item_for_path(base_path, = {}) stub_content_store_does_not_have_item(base_path, ) stub_publishing_api_graphql_does_not_have_item(base_path) end |
#stub_conditional_loader_returns_content_item_for_path(base_path, body = content_item_for_base_path(base_path), options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/govuk_content_item_loader/test_helpers.rb', line 9 def stub_conditional_loader_returns_content_item_for_path(base_path, body = content_item_for_base_path(base_path), = {}) stub_content_store_has_item(base_path, body, ) stub_publishing_api_graphql_has_item(base_path, body, ) end |