diff --git a/test/functional/forum_posts_controller_test.rb b/test/functional/forum_posts_controller_test.rb index 18b53f7fa..0dda30fda 100644 --- a/test/functional/forum_posts_controller_test.rb +++ b/test/functional/forum_posts_controller_test.rb @@ -13,7 +13,7 @@ class ForumPostsControllerTest < ActionDispatch::IntegrationTest context "with votes" do setup do as_user do - @tag_alias = create(:tag_alias, forum_post: @forum_post, status: "pending") + @bulk_update_request = create(:bulk_update_request, forum_post: @forum_post) @vote = create(:forum_post_vote, forum_post: @forum_post, score: 1) @forum_post.reload end @@ -29,10 +29,10 @@ class ForumPostsControllerTest < ActionDispatch::IntegrationTest assert_select "li.vote-score-up" end - context "after the alias is rejected" do + context "after the BUR is rejected" do setup do as(@mod) do - @tag_alias.reject! + @bulk_update_request.reject! end get_auth forum_topic_path(@forum_topic), @mod end diff --git a/test/functional/forum_topics_controller_test.rb b/test/functional/forum_topics_controller_test.rb index e2393ae0b..31c3534eb 100644 --- a/test/functional/forum_topics_controller_test.rb +++ b/test/functional/forum_topics_controller_test.rb @@ -132,46 +132,45 @@ class ForumTopicsControllerTest < ActionDispatch::IntegrationTest context "when listing topics" do should "always show topics as read for anonymous users" do get forum_topics_path - assert_select "span.new", count: 0 + assert_select 'tr[data-is-read="false"]', count: 0 end should "show topics as read after viewing them" do get_auth forum_topics_path, @user assert_response :success - assert_select "span.new", count: 3 + assert_select 'tr[data-is-read="false"]', count: 3 get_auth forum_topic_path(@forum_topic.id), @user assert_response :success get_auth forum_topics_path, @user assert_response :success - assert_select "span.new", count: 2 end should "show topics as read after marking all as read" do get_auth forum_topics_path, @user assert_response :success - assert_select "span.new", count: 3 + assert_select 'tr[data-is-read="false"]', count: 3 post_auth mark_all_as_read_forum_topics_path, @user assert_response 302 get_auth forum_topics_path, @user assert_response :success - assert_select "span.new", count: 0 + assert_select 'tr[data-is-read="false"]', count: 0 end should "show topics on page 2 as read after marking all as read" do get_auth forum_topics_path(page: 2, limit: 1), @user assert_response :success - assert_select "span.new", count: 1 + assert_select 'tr[data-is-read="false"]', count: 1 post_auth mark_all_as_read_forum_topics_path, @user assert_response 302 get_auth forum_topics_path(page: 2, limit: 1), @user assert_response :success - assert_select "span.new", count: 0 + assert_select 'tr[data-is-read="false"]', count: 0 end end end