サクサク読めて、アプリ限定の機能も多数!
Rails でテスト時に CSRF チェックはデフォルト無効になるが、有効にしたいときは ActionController::Base.allow_forgery_protection = true で。
progrhyme のブックマーク 2016/05/06 16:34
How to POST with missing authenticity_token in rspec rails request test?Rails でテスト時に CSRF チェックはデフォルト無効になるが、有効にしたいときは ActionController::Base.allow_forgery_protection = true で。2016/05/06 16:34
このブックマークにはスターがありません。 最初のスターをつけてみよう!
stackoverflow.com2016/05/06
I'm simulating a request coming from an external service, which will not have an authenticity token. I want the test to fail if skip_before_action :verify_authenticity_token is missing. How do I do...
2 人がブックマーク・2 件のコメント
\ コメントが サクサク読める アプリです /
Rails でテスト時に CSRF チェックはデフォルト無効になるが、有効にしたいときは ActionController::Base.allow_forgery_protection = true で。
このブックマークにはスターがありません。
最初のスターをつけてみよう!
How to POST with missing authenticity_token in rspec rails request test?
I'm simulating a request coming from an external service, which will not have an authenticity token. I want the test to fail if skip_before_action :verify_authenticity_token is missing. How do I do...
2 人がブックマーク・2 件のコメント
\ コメントが サクサク読める アプリです /