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

Switch allow_forgery_protection to false in test #3873

Closed
kennyadsl opened this issue Dec 22, 2020 · 3 comments
Closed

Switch allow_forgery_protection to false in test #3873

kennyadsl opened this issue Dec 22, 2020 · 3 comments

Comments

@kennyadsl
Copy link
Member

With this commit I switched the default value of allow_forgery_protection to true in our spec suite to mimic what we see in a new Rails application after rails/rails@ec4a836.

But this doesn't mean that Rails wants us to test the application with that value set to true, in fact, the default is false in the test environment template.

Other than not adhere to a Rails convention, it's important that we change this in order to be able to use system specs in Solidus frontend, which we are trying to convert in the new starter frontend project.

@FrancescoAiello01
Copy link
Contributor

FrancescoAiello01 commented Jan 7, 2021

Hey @kennyadsl taking a look at this issue.

I'm wondering if dummy_app.rb should always turn off forgery protection, just as real Rails apps turn it off in their test env? Or should it still be enabled in certain circumstances?

Thanks,
Francesco

@kennyadsl
Copy link
Member Author

Hey @FrancescoAiello01, I can't see any circumstance when we need to keep it enabled at the moment. I think we are good if we just disable it.

@FrancescoAiello01
Copy link
Contributor

Cool @kennyadsl sounds good. Just opened a PR over here. Let me know what you think.

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

No branches or pull requests

2 participants