X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/fa00a386647c8d85cf01c356b025ad26b87bcb96..5d887a37bf9f4687724edf5b2760ed67e6fdb0b9:/test/controllers/diary_entries_controller_test.rb?ds=sidebyside diff --git a/test/controllers/diary_entries_controller_test.rb b/test/controllers/diary_entries_controller_test.rb index 84d650e23..2b10402fa 100644 --- a/test/controllers/diary_entries_controller_test.rb +++ b/test/controllers/diary_entries_controller_test.rb @@ -53,10 +53,6 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest { :path => "/user/username/diary/comments", :method => :get }, { :controller => "diary_entries", :action => "comments", :display_name => "username" } ) - assert_routing( - { :path => "/user/username/diary/comments/1", :method => :get }, - { :controller => "diary_entries", :action => "comments", :display_name => "username", :page => "1" } - ) assert_routing( { :path => "/diary/new", :method => :get }, @@ -114,6 +110,9 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest { :path => "/user/username/diary/1/unsubscribe", :method => :post }, { :controller => "diary_entries", :action => "unsubscribe", :display_name => "username", :id => "1" } ) + + get "/user/username/diary/comments/1" + assert_redirected_to "/user/username/diary/comments" end def test_new_no_login @@ -886,8 +885,9 @@ class DiaryEntriesControllerTest < ActionDispatch::IntegrationTest get diary_comments_path(:display_name => other_user.display_name) assert_response :success assert_template :comments - assert_select "table.table-striped" do - assert_select "tr", :count => 2 # header and one comment + assert_dom "a[href='#{user_path(other_user)}']", :text => other_user.display_name + assert_select "table.table-striped tbody" do + assert_select "tr", :count => 1 end # Test a suspended user