module GdsApi::TestHelpers::ContentStore

def content_store_has_gone_item(base_path, body = gone_content_item_for_base_path(base_path), options = {})

Options Hash: (**options)
  • draft (String) -- Will point to the draft content store if set to true

Parameters:
  • options (Hash) --
  • body (Hash) --
  • base_path (String) --
def content_store_has_gone_item(base_path, body = gone_content_item_for_base_path(base_path), options = {})
  url = content_store_endpoint(options[:draft]) + "/content" + base_path
  body = body.to_json unless body.is_a?(String)
  stub_request(:get, url).to_return(
    status: 410,
    body: body,
    headers: {}
  )
end