spec/controllers/forgeries_controller_spec.rb in clearance-1.16.1 vs spec/controllers/forgeries_controller_spec.rb in clearance-1.16.2
- old
+ new
@@ -36,15 +36,19 @@
Rails.application.reload_routes!
end
it 'succeeds with authentic token' do
token = controller.send(:form_authenticity_token)
- post :create, authenticity_token: token
+ post :create, params: {
+ authenticity_token: token,
+ }
expect(subject).to redirect_to(action: 'index')
end
it 'fails with invalid token' do
- post :create, authenticity_token: 'hax0r'
+ post :create, params: {
+ authenticity_token: "hax0r",
+ }
expect(subject).to deny_access
end
it 'fails with no token' do
post :create