Merge branch 'main' into cursor/split-sidebar-membership-queries-8545

This commit is contained in:
Thomas Klemm
2026-10-05 17:47:46 +03:00
committed by GitHub
12 changed files with 87 additions and 15 deletions
@@ -6,6 +6,13 @@ class Messages::BoostsControllerTest < ActionDispatch::IntegrationTest
@message = messages(:first)
end
test "index wires the new boost link to the soft keyboard" do
get message_boosts_url(@message)
assert_response :success
assert_select ".message__boost-inline a.boost__action[data-action='soft-keyboard#open']"
end
test "create" do
assert_turbo_stream_broadcasts [ @message.room, :messages ], count: 1 do
assert_difference -> { @message.boosts.count }, 1 do
@@ -20,6 +20,24 @@ class SearchesControllerTest < ActionDispatch::IntegrationTest
assert_select ".message", text: /Hello world!/
end
test "operator words are searched for as words" do
rooms(:designers).messages.create! body: "Salt and pepper", client_message_id: "operators", creator: users(:david)
get searches_url, params: { q: "salt AND" }
assert_response :success
assert_select ".message", text: /Salt and pepper/
end
test "searching for an operator word alone doesn't fail" do
%w[ AND OR NOT ].each do |word|
get searches_url, params: { q: word }
assert_response :success
assert_select ".message", count: 0
end
end
test "unreachable messages are not found" do
memberships(:david_designers).destroy!