valid URLs in cc.xml Project webUrl
This commit is contained in:
parent
6940532994
commit
c57e9cbcc6
|
@ -28,7 +28,7 @@ module Travis::Api::App::Responders
|
||||||
def data
|
def data
|
||||||
{
|
{
|
||||||
name: resource.slug,
|
name: resource.slug,
|
||||||
url: [Travis.config.domain, resource.slug].join('/'),
|
url: File.join("http://", Travis.config.domain, resource.slug),
|
||||||
activity: activity,
|
activity: activity,
|
||||||
label: last_build.try(:number),
|
label: last_build.try(:number),
|
||||||
status: status,
|
status: status,
|
||||||
|
|
|
@ -14,6 +14,7 @@ require 'support/matchers'
|
||||||
|
|
||||||
Travis.logger = Logger.new(StringIO.new)
|
Travis.logger = Logger.new(StringIO.new)
|
||||||
Travis::Api::App.setup
|
Travis::Api::App.setup
|
||||||
|
Travis.config.domain = "www.example.com"
|
||||||
|
|
||||||
module TestHelpers
|
module TestHelpers
|
||||||
include Sinatra::TestHelpers
|
include Sinatra::TestHelpers
|
||||||
|
|
|
@ -62,7 +62,7 @@ RSpec::Matchers.define :deliver_cc_xml_for do |repo|
|
||||||
"expected #{body} to be a valid cc.xml"
|
"expected #{body} to be a valid cc.xml"
|
||||||
end
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user