Skip to content

Commit

Permalink
Merge pull request #860 from alphagov/fix-webmock-allow
Browse files Browse the repository at this point in the history
Use full uri to WebMock allow option
  • Loading branch information
pixeltrix authored Nov 30, 2020
2 parents ea28297 + 367627a commit 39d7bc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@

FactoryBot.find_definitions

WebMock.disable_net_connect!(allow_localhost: true, allow: /^elasticsearch[-a-z0-9]*$/)
WebMock.disable_net_connect!(
allow_localhost: true,
allow: Rails.configuration.elasticsearch["host"],
)

RSpec.configure do |config|
# RSpec Rails can automatically mix in different behaviours to your tests
Expand Down

0 comments on commit 39d7bc6

Please sign in to comment.