]> git.openstreetmap.org Git - rails.git/commitdiff
Test rows inside messages table body
authorAnton Khorev <tony29@yandex.ru>
Mon, 15 Apr 2024 00:51:43 +0000 (03:51 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 15 Apr 2024 21:44:53 +0000 (00:44 +0300)
test/controllers/messages_controller_test.rb

index 40581993fc6a7b6d648e9cc2928a863fbfe36959..5ef0233bf3096db3ebc0585e3e33503c1c98fe6e 100644 (file)
@@ -339,8 +339,8 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
     get inbox_messages_path
     assert_response :success
     assert_template "inbox"
-    assert_select ".content-inner > table", :count => 1 do
-      assert_select "tr", :count => 2
+    assert_select ".content-inner > table.messages-table > tbody", :count => 1 do
+      assert_select "tr", :count => 1
       assert_select "tr#inbox-#{read_message.id}.inbox-row", :count => 1 do
         assert_select "a[href='#{user_path read_message.sender}']", :text => read_message.sender.display_name
         assert_select "a[href='#{message_path read_message}']", :text => read_message.title
@@ -365,8 +365,8 @@ class MessagesControllerTest < ActionDispatch::IntegrationTest
     get outbox_messages_path
     assert_response :success
     assert_template "outbox"
-    assert_select ".content-inner > table", :count => 1 do
-      assert_select "tr", :count => 2
+    assert_select ".content-inner > table.messages-table > tbody", :count => 1 do
+      assert_select "tr", :count => 1
       assert_select "tr.inbox-row", :count => 1 do
         assert_select "a[href='#{user_path message.recipient}']", :text => message.recipient.display_name
         assert_select "a[href='#{message_path message}']", :text => message.title