Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing tests in tools_controller_spec.rb #908

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

jparr
Copy link
Collaborator

@jparr jparr commented Apr 4, 2024

No description provided.

@jparr jparr requested a review from esoterik April 4, 2024 19:31
@@ -66,8 +66,7 @@
it "should redirect to ActionPage#service_uri(service) if email has custom recipients" do
service = "gmail"
uri = "https://composeurl.example.com"
expect(ActionPage).to receive(:find_by_id) { custom_email_campaign.action_page }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont really need to mock this. its ok to let it hit the database

@@ -93,7 +91,6 @@
Rails.application.secrets.google_civic_api_key = "test-key-for-civic-api"

stub_request(:get, "http://civic.example.com/?address=%20&includeOffices=true&key=test-key-for-civic-api&levels=administrativeArea1&roles=legislatorUpperBody")
.with(headers: request_headers)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need to match on header specific values. This would be valuable if the controller action had different execution paths based on header values. It broke on my machine because of different user agents.

@esoterik esoterik merged commit 586fa72 into 2024-upgrades-main Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants