Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Make test work regardless of environment.

For reasons that aren't quite clear to me, the server returned by
Plek.current.find("contactotron") is different on the CI server. This change
makes the test work there, too.
  • Loading branch information...
commit f9452fa27594da8fc35b5d04c3fc37e8550306b4 1 parent 8d841e0
Paul Battley threedaymonk authored

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. +3 5 test/unit/contact_test.rb
8 test/unit/contact_test.rb
@@ -11,11 +11,9 @@ class ContactTest < ActiveSupport::TestCase
11 11 end
12 12
13 13 test "should import contact details from contactotron" do
14   - %w[ http https ].each do |protocol|
15   - FakeWeb.register_uri(:get, "#{protocol}://contactotron.test.gov.uk/contacts/189",
16   - body: File.read(Rails.root.join("test", "fixtures", "contactotron_api_response.json"))
17   - )
18   - end
  14 + FakeWeb.register_uri(:get, "#{Plek.current.find("contactotron")}/contacts/189",
  15 + body: File.read(Rails.root.join("test", "fixtures", "contactotron_api_response.json"))
  16 + )
19 17 contact = Contact.new(contactotron_id: 189)
20 18 contact.update_from_contactotron
21 19 contact.reload

0 comments on commit f9452fa

Please sign in to comment.
Something went wrong with that request. Please try again.