module GdsApi::TestHelpers::PublishingApiV2
def stub_publishing_api_publish(content_id, body, response_hash = {})
-
response_hash(Hash) -- -
body(String) -- -
content_id(UUID) --
def stub_publishing_api_publish(content_id, body, response_hash = {}) url = PUBLISHING_API_V2_ENDPOINT + "/content/#{content_id}/publish" response = { status: 200, body: '{}', headers: { "Content-Type" => "application/json; charset=utf-8" } }.merge(response_hash) stub_request(:post, url).with(body: body).to_return(response) end