Skip to content
Browse files

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...
1 parent 8d841e0 commit f9452fa27594da8fc35b5d04c3fc37e8550306b4 @threedaymonk threedaymonk committed May 1, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 test/unit/contact_test.rb
View
8 test/unit/contact_test.rb
@@ -11,11 +11,9 @@ class ContactTest < ActiveSupport::TestCase
end
test "should import contact details from contactotron" do
- %w[ http https ].each do |protocol|
- FakeWeb.register_uri(:get, "#{protocol}://contactotron.test.gov.uk/contacts/189",
- body: File.read(Rails.root.join("test", "fixtures", "contactotron_api_response.json"))
- )
- end
+ FakeWeb.register_uri(:get, "#{Plek.current.find("contactotron")}/contacts/189",
+ body: File.read(Rails.root.join("test", "fixtures", "contactotron_api_response.json"))
+ )
contact = Contact.new(contactotron_id: 189)
contact.update_from_contactotron
contact.reload

0 comments on commit f9452fa

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