stub_create_release_upload_exception

in spec/upload_stubs.rb [81:91]


def stub_create_release_upload_exception(status, body = nil, app_name = "app", owner_name = "owner")
  stub_request(:post, "https://api.appcenter.ms/v0.1/apps/#{owner_name}/#{app_name}/uploads/releases")
    .with(body: body && JSON.generate(body) || "{}")
    .to_raise(Faraday::Error).then
    .to_return(
      status: status,
      body: "{\"id\":\"upload_id\",\"upload_domain\":\"https://upload-domain.com\",\"package_asset_id\":\"1234\",\"url_encoded_token\":\"123abc\"}",
      headers: { 'Content-Type' => 'application/json' }
    )
end