valid URLs in cc.xml Project webUrl

This commit is contained in:
Andre Arko 2013-02-06 23:25:42 -08:00 committed by Piotr Sarnacki
parent 6940532994
commit c57e9cbcc6
3 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ module Travis::Api::App::Responders
def data
{
name: resource.slug,
url: [Travis.config.domain, resource.slug].join('/'),
url: File.join("http://", Travis.config.domain, resource.slug),
activity: activity,
label: last_build.try(:number),
status: status,

View File

@ -14,6 +14,7 @@ require 'support/matchers'
Travis.logger = Logger.new(StringIO.new)
Travis::Api::App.setup
Travis.config.domain = "www.example.com"
module TestHelpers
include Sinatra::TestHelpers

View File

@ -62,7 +62,7 @@ RSpec::Matchers.define :deliver_cc_xml_for do |repo|
"expected #{body} to be a valid cc.xml"
end
body.include?('<Projects>') && body.include?(%(name="#{repo.slug}"))
body.include?('<Projects>') && body.include?(%(name="#{repo.slug}")) && body.include?("http://www.example.com/#{repo.slug}")
end
end