Skip to content

Commit

Permalink
test: ensure broker returns absolute URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 14, 2018
1 parent a759480 commit d4792f3
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions spec/service_providers/pact_ruby_fetch_pacts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1')
href: Pact.term('http://pact-broker-url-for-consumer-1', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2')
href: Pact.term('http://pact-broker-url-for-consumer-2', %r{http://.*})
}
]
}
Expand All @@ -96,7 +96,7 @@
it 'returns the array of pact urls' do
pacts = Pact::PactBroker::FetchPacts.call(provider, tags, broker_base_url, basic_auth_options, all_pacts)

expect(pacts).to eq(%w[pact-broker-url-for-consumer-1 pact-broker-url-for-consumer-2])
expect(pacts).to eq(%w[http://pact-broker-url-for-consumer-1 http://pact-broker-url-for-consumer-2])
end
end

Expand All @@ -119,10 +119,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1-tag-1')
href: Pact.term('http://pact-broker-url-for-consumer-1-tag-1', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2-tag-1')
href: Pact.term('http://pact-broker-url-for-consumer-2-tag-1', %r{http://.*})
}
]
}
Expand All @@ -142,10 +142,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1-tag-2')
href: Pact.term('http://pact-broker-url-for-consumer-1-tag-2', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2-tag-2')
href: Pact.term('http://pact-broker-url-for-consumer-2-tag-2', %r{http://.*})
}
]
}
Expand All @@ -156,8 +156,8 @@
it 'returns the array of pact urls' do
pacts = Pact::PactBroker::FetchPacts.call(provider, tags, broker_base_url, basic_auth_options, all_pacts)

expect(pacts).to eq(%w[pact-broker-url-for-consumer-1-tag-1 pact-broker-url-for-consumer-2-tag-1
pact-broker-url-for-consumer-1-tag-2 pact-broker-url-for-consumer-2-tag-2])
expect(pacts).to eq(%w[http://pact-broker-url-for-consumer-1-tag-1 http://pact-broker-url-for-consumer-2-tag-1
http://pact-broker-url-for-consumer-1-tag-2 http://pact-broker-url-for-consumer-2-tag-2])
end
end

Expand All @@ -180,10 +180,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1-tag-1-all')
href: Pact.term('http://pact-broker-url-for-consumer-1-tag-1-all', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2-tag-1-all')
href: Pact.term('http://pact-broker-url-for-consumer-2-tag-1-all', %r{http://.*})
}
]
}
Expand All @@ -203,10 +203,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1-tag-2-all')
href: Pact.term('http://pact-broker-url-for-consumer-1-tag-2-all', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2-tag-2-all')
href: Pact.term('http://pact-broker-url-for-consumer-2-tag-2-all', %r{http://.*})
}
]
}
Expand All @@ -217,8 +217,8 @@
it 'returns the array of pact urls' do
pacts = Pact::PactBroker::FetchPacts.call(provider, tags, broker_base_url, basic_auth_options, all_pacts)

expect(pacts).to eq(%w[pact-broker-url-for-consumer-1-tag-1-all pact-broker-url-for-consumer-2-tag-1-all
pact-broker-url-for-consumer-1-tag-2-all pact-broker-url-for-consumer-2-tag-2-all])
expect(pacts).to eq(%w[http://pact-broker-url-for-consumer-1-tag-1-all http://pact-broker-url-for-consumer-2-tag-1-all
http://pact-broker-url-for-consumer-1-tag-2-all http://pact-broker-url-for-consumer-2-tag-2-all])
end
end

Expand All @@ -241,10 +241,10 @@
_links: {
pacts: [
{
href: Pact.like('pact-broker-url-for-consumer-1-all')
href: Pact.term('http://pact-broker-url-for-consumer-1-all', %r{http://.*})
},
{
href: Pact.like('pact-broker-url-for-consumer-2-all')
href: Pact.term('http://pact-broker-url-for-consumer-2-all', %r{http://.*})
}
]
}
Expand All @@ -255,7 +255,7 @@
it 'returns the array of pact urls' do
pacts = Pact::PactBroker::FetchPacts.call(provider, tags, broker_base_url, basic_auth_options, all_pacts)

expect(pacts).to eq(%w[pact-broker-url-for-consumer-1-all pact-broker-url-for-consumer-2-all])
expect(pacts).to eq(%w[http://pact-broker-url-for-consumer-1-all http://pact-broker-url-for-consumer-2-all])
end
end
end
Expand Down

0 comments on commit d4792f3

Please sign in to comment.