diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 22:14:29 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 22:14:29 +0200 |
| commit | 8135e08107f81c38389ec3938df85a9b9f0e1f4f (patch) | |
| tree | 999bbe25775da5feff5d02151132607973a82c1a /test/test_helper.rb | |
| parent | 4bae8227d9dd7cb61ceb6bfaad04bf0fc0f720ca (diff) | |
Load the test schema through Rails, and keep the search trigger installed
Diffstat (limited to 'test/test_helper.rb')
| -rw-r--r-- | test/test_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 7ab9c8c9..b7fe2b58 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb | |||
| @@ -2,6 +2,12 @@ ENV["RAILS_ENV"] = "test" | |||
| 2 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | 2 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") |
| 3 | require 'rails/test_help' | 3 | require 'rails/test_help' |
| 4 | 4 | ||
| 5 | # rails/test_help calls maintain_test_schema!, which reloads db/schema.rb | ||
| 6 | # in this process when a migration is pending. That recreates | ||
| 7 | # page_translations and drops the search_vector trigger the initializer | ||
| 8 | # installed at boot. Reinstall it here, after any such reload. | ||
| 9 | Page.ensure_search_vector_trigger! | ||
| 10 | |||
| 5 | module ActiveRecord | 11 | module ActiveRecord |
| 6 | class FixtureSet | 12 | class FixtureSet |
| 7 | class << self | 13 | class << self |
