mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Use the keyword args syntax for controller actions
Co-Authored-By: Dan Rice <dnrce@users.noreply.github.com>
This commit is contained in:
parent
755a7a1b80
commit
2f85a42f91
19 changed files with 258 additions and 241 deletions
|
|
@ -13,7 +13,7 @@ class NotesControllerTest < ActionController::TestCase
|
|||
project = users(:admin_user).projects.first
|
||||
count = users(:admin_user).notes.count
|
||||
|
||||
post :create, note: {body: "test note", project_id: project.id}, format: :js
|
||||
post :create, params: { note: {body: "test note", project_id: project.id}, format: :js }
|
||||
|
||||
assert_response 200
|
||||
assert assigns['saved'], "@saved should be true"
|
||||
|
|
@ -26,7 +26,7 @@ class NotesControllerTest < ActionController::TestCase
|
|||
note = users(:admin_user).notes.first
|
||||
|
||||
refute_equal "test", note.body
|
||||
post :update, id: note.id, note: {body: "test"}, format: :js
|
||||
post :update, params: { id: note.id, note: {body: "test"}, format: :js }
|
||||
assert_equal "test", note.reload.body
|
||||
end
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ class NotesControllerTest < ActionController::TestCase
|
|||
note = users(:admin_user).notes.first
|
||||
count = users(:admin_user).notes.count
|
||||
|
||||
post :destroy, id: note.id, format: :js
|
||||
post :destroy, params: { id: note.id, format: :js }
|
||||
|
||||
old_note = users(:admin_user).notes.where(id: note.id).first
|
||||
assert_nil old_note
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue