mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-08 07:40:08 +09:00
Simplify messages_count trigger install and harden ensure!
Require all three SQLite triggers before treating the counter as installed, drop the schema.rb / dump-rewrite install paths in favor of rake ensure after schema load, isolate destructive trigger tests, and cover foreign room moves plus fixture baseline counts. Co-authored-by: Thomas Klemm <github@tklemm.eu>
This commit is contained in:
@@ -103,7 +103,6 @@ class Messages::ByBotsControllerTest < ActionDispatch::IntegrationTest
|
||||
|
||||
json = JSON.parse(response.body)
|
||||
assert_equal Message::PAGE_SIZE, json.size
|
||||
assert_equal @room.reload.messages_count.to_s, response.headers["X-Total-Count"]
|
||||
assert_equal "41", response.headers["X-Total-Count"]
|
||||
assert_not_includes json.map { it["id"] }, messages(:fourth).id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user