stub_add_to_destination

in spec/upload_stubs.rb [215:228]


def stub_add_to_destination(status, app_name = "app", owner_name = "owner", destination_type = "group", mandatory_update: false, notify_testers: false)
  if destination_type == "group"
    body = "{\"id\":\"1\",\"mandatory_update\":#{mandatory_update},\"notify_testers\":#{notify_testers}}"
  else
    body = "{\"id\":\"1\"}"
  end

  stub_request(:post, "https://api.appcenter.ms/v0.1/apps/#{owner_name}/#{app_name}/releases/1/#{destination_type}s")
    .with(
      body: body
    )
    .to_return(status: status, body: "{\"version\":\"3\",\"short_version\":\"1.0.0\",\"download_link\":\"https://download.link\"}", headers: { 'Content-Type' => 'application/json' })
end