mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 21:54:06 +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
|
|
@ -8,7 +8,7 @@ describe UsersController do
|
|||
|
||||
describe 'GET #show' do
|
||||
before :each do
|
||||
get :show, id: user.id
|
||||
get :show, params: { id: user.id }
|
||||
end
|
||||
|
||||
it 'renders show template' do
|
||||
|
|
@ -35,7 +35,7 @@ describe UsersController do
|
|||
describe 'GET #edit' do
|
||||
it 'assigns the right value to @user' do
|
||||
sign_in user
|
||||
get :edit, id: user.id
|
||||
get :edit, params: { id: user.id }
|
||||
expect(assigns(:user)).to eq user
|
||||
end
|
||||
end
|
||||
|
|
@ -44,7 +44,7 @@ describe UsersController do
|
|||
context 'with valid attributes' do
|
||||
before :each do
|
||||
sign_in user
|
||||
patch :update, id: user.id, user: attributes_for(:user, name: 'My Test Name')
|
||||
patch :update, params: { id: user.id, user: attributes_for(:user, name: 'My Test Name') }
|
||||
user.reload
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue