stub_create_app_exception

in spec/upload_stubs.rb [41:53]


def stub_create_app_exception(status, app_name = "app", app_display_name = "app", app_os = "Android", app_platform = "Java", owner_type = "user", owner_name = "owner")
  stub_request(:post, owner_type == "user" ? "https://api.appcenter.ms/v0.1/apps" : "https://api.appcenter.ms/v0.1/orgs/#{owner_name}/apps")
    .with(
      body: "{\"display_name\":\"#{app_display_name}\",\"name\":\"#{app_name}\",\"os\":\"#{app_os}\",\"platform\":\"#{app_platform}\"}"
    )
    .to_raise(Faraday::Error).then
    .to_return(
      status: status,
      body: "{\"name\":\"app\"}",
      headers: { 'Content-Type' => 'application/json' }
    )
end