mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Use keyword arguments in tests
Raisl 5.1 removes support for non-keyword arguments in `#process`, `#get`, `#post`, `#patch`, `#put`, `#delete`, and `#head` for the `ActionDispatch::IntegrationTest` and `ActionController::TestCase` classes. This means we have to add `params` everywhere in the controller tests.
This commit is contained in:
parent
b8013661a2
commit
d1180e2767
35 changed files with 975 additions and 364 deletions
|
|
@ -14,14 +14,14 @@ describe Admin::CfpsController do
|
|||
|
||||
describe 'POST #create' do
|
||||
it 'successes' do
|
||||
post :create, conference_id: conference.short_title, cfp: { cfp_type: 'events', start_date: today, end_date: today + 6.days, description: 'We call for papers, or tabak, or you know what!' }
|
||||
post :create, params: { conference_id: conference.short_title, cfp: { cfp_type: 'events', start_date: today, end_date: today + 6.days, description: 'We call for papers, or tabak, or you know what!' } }
|
||||
expect(flash[:notice]).to match('Call for papers successfully created.')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'POST #update' do
|
||||
it 'successes' do
|
||||
patch :update, conference_id: conference.short_title, id: cfp.id, cfp: { end_date: today + 10.days }
|
||||
patch :update, params: { conference_id: conference.short_title, id: cfp.id, cfp: { end_date: today + 10.days } }
|
||||
expect(flash[:notice]).to match('Call for papers successfully updated.')
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue