このコミットが含まれているのは:
@@ -53,6 +53,14 @@ RSpec.configure do |config|
|
||||
config.include AuthHelper, type: :request
|
||||
config.include JsonHelper, type: :request
|
||||
|
||||
config.around(:each, type: :request) do |example|
|
||||
previous = ApplicationController.allow_forgery_protection
|
||||
ApplicationController.allow_forgery_protection = example.metadata.fetch(:csrf, false)
|
||||
example.run
|
||||
ensure
|
||||
ApplicationController.allow_forgery_protection = previous
|
||||
end
|
||||
|
||||
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
||||
config.fixture_paths = [
|
||||
Rails.root.join('spec/fixtures')
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする