Skip to content

Commit

Permalink
Be more specific with my use of regexs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Aug 4, 2024
1 parent 5e10c5c commit 10da5ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/features/activate_account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
expect(current_email.default_part_body.to_s).to include("Thanks for getting onboard!")

# Do these shenanigans to get the first link in this case
link = links_in_email(current_email).find { |u| u =~ %r{https://dev.planningalerts.org.au} }
link = links_in_email(current_email).find { |u| u =~ %r{https://dev\.planningalerts\.org\.au} }
visit request_uri(link)

fill_in "Your full name", with: "Matthew"
Expand Down Expand Up @@ -125,7 +125,7 @@
expect(current_email.default_part_body.to_s).to include("Thanks for getting onboard!")

# Do these shenanigans to get the first link in this case
link = links_in_email(current_email).find { |u| u =~ %r{https://dev.planningalerts.org.au} }
link = links_in_email(current_email).find { |u| u =~ %r{https://dev\.planningalerts\.org\.au} }
visit request_uri(link)

fill_in "Your full name", with: "Matthew"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/sign_up_for_alerts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
expect(current_email).to have_subject("PlanningAlerts: Confirmation instructions")

# Do these shenanigans to get the first link in this case
link = links_in_email(current_email).find { |u| u =~ %r{https://dev.planningalerts.org.au} }
link = links_in_email(current_email).find { |u| u =~ %r{https://dev\.planningalerts\.org\.au} }
visit request_uri(link)

expect(page).to have_content("Your email address has been successfully confirmed and you are now logged in.")
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# which automatically downloads the webdriver for headless testing
c.ignore_hosts "github.com"
c.ignore_request do |request|
URI(request.uri).host =~ /objects.githubusercontent.com/
URI(request.uri).host =~ /objects\.githubusercontent\.com/
# false
# URI(request.uri).port == 7777
end
Expand Down

0 comments on commit 10da5ee

Please sign in to comment.