diff options
author | Starfall <us@starfall.systems> | 2022-07-25 18:53:31 -0500 |
---|---|---|
committer | Starfall <us@starfall.systems> | 2022-07-25 18:53:31 -0500 |
commit | 5b9419060d79eda85c40a12c567dd0e1e44a7ecb (patch) | |
tree | f5e21930844f7c11ae40b9097a78a32916ba5dba /lib/tasks | |
parent | a137fecf94d25a03ef7224843c1afd0c30f428e6 (diff) | |
parent | 3a7c641dd4db1d67b172f731518b472d58dd2262 (diff) |
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/tests.rake | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/tasks/tests.rake b/lib/tasks/tests.rake index 0f3b44a74..65bff6a8e 100644 --- a/lib/tasks/tests.rake +++ b/lib/tasks/tests.rake @@ -38,10 +38,26 @@ namespace :tests do puts 'Instance actor does not have a private key' exit(1) end + + unless Account.find_by(username: 'user', domain: nil).custom_filters.map { |filter| filter.keywords.pluck(:keyword) } == [['test'], ['take']] + puts 'CustomFilterKeyword records not created as expected' + exit(1) + end + end + + desc 'Populate the database with test data for 2.4.3' + task populate_v2_4_3: :environment do # rubocop:disable Naming/VariableNumber + ActiveRecord::Base.connection.execute(<<~SQL) + INSERT INTO "custom_filters" + (id, account_id, phrase, context, whole_word, irreversible, created_at, updated_at) + VALUES + (1, 2, 'test', '{ "home", "public" }', true, true, now(), now()), + (2, 2, 'take', '{ "home" }', false, false, now(), now()); + SQL end desc 'Populate the database with test data for 2.4.0' - task populate_v2_4: :environment do + task populate_v2_4: :environment do # rubocop:disable Naming/VariableNumber ActiveRecord::Base.connection.execute(<<~SQL) INSERT INTO "settings" (id, thing_type, thing_id, var, value, created_at, updated_at) |