module GdsApi::TestHelpers::PublishingApi

def stub_publishing_api_put_intent(base_path, body = intent_for_base_path(base_path))

def stub_publishing_api_put_intent(base_path, body = intent_for_base_path(base_path))
  url = PUBLISHING_API_ENDPOINT + "/publish-intent" + base_path
  body = body.to_json unless body.is_a?(String)
  stub_request(:put, url).with(body: body).to_return(status: 201, body: body, headers: {})
end