X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f0b8498879a32688f62a8c23522542485bf535a4..55e3f90dd47bd96970cd0d9e55fb56e70dd8cc75:/test/controllers/diary_entries_controller_test.rb diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index 91e2a58d9..a1c22fff8 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -159,8 +159,8 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest post diary_entries_path(:diary_entry => { :title => "New Title", :body => "This is a new body for the diary entry", :latitude => "1.1", :longitude => "2.2", :language_code => "en" }) end - assert_redirected_to :action => :index, :display_name => user.display_name entry = DiaryEntry.last + assert_redirected_to diary_entry_path(user, entry) assert_equal user.id, entry.user_id assert_equal "New Title", entry.title assert_equal "This is a new body for the diary entry", entry.body @@ -184,8 +184,8 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest post diary_entries_path(:diary_entry => { :title => "New Title", :body => "This is a new body for the diary entry", :latitude => "1.1", :longitude => "2.2", :language_code => "de" }) end - assert_redirected_to :action => :index, :display_name => user.display_name entry = DiaryEntry.last + assert_redirected_to diary_entry_path(user, entry) assert_equal user.id, entry.user_id assert_equal "New Title", entry.title assert_equal "This is a new body for the diary entry", entry.body @@ -211,8 +211,8 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest assert_difference "DiaryEntry.count", 1 do post diary_entries_path(:diary_entry => { :title => spammy_title, :body => spammy_body, :language_code => "en" }) end - assert_redirected_to :action => :index, :display_name => user.display_name entry = DiaryEntry.last + assert_redirected_to diary_entry_path(user, entry) assert_equal user.id, entry.user_id assert_equal spammy_title, entry.title assert_equal spammy_body, entry.body