diff --git a/app/models/forum_topic.rb b/app/models/forum_topic.rb index a96ff4a5e..458aad16d 100644 --- a/app/models/forum_topic.rb +++ b/app/models/forum_topic.rb @@ -48,7 +48,7 @@ class ForumTopic < ApplicationRecord module SearchMethods def active - where("is_deleted = false") + where(is_deleted: false) end def permitted diff --git a/test/functional/forum_posts_controller_test.rb b/test/functional/forum_posts_controller_test.rb index 7c1364470..41014b978 100644 --- a/test/functional/forum_posts_controller_test.rb +++ b/test/functional/forum_posts_controller_test.rb @@ -57,7 +57,7 @@ class ForumPostsControllerTest < ActionDispatch::IntegrationTest context "with search conditions" do should "list all matching forum posts" do - get forum_posts_path, params: {:search => {:body_matches => "xxx"}} + get forum_posts_path, params: { search: { body_matches: "xxx", topic_title_matches: "my forum topic" }} assert_response :success assert_select "#forum-post-#{@forum_post.id}" end