Fix notification policy migration not preserving filter_private_mentions
correctly (#29699)
This commit is contained in:
parent
142c018cfa
commit
70a8fcf07d
4 changed files with 65 additions and 4 deletions
|
@ -105,6 +105,12 @@ namespace :tests do
|
|||
exit(1)
|
||||
end
|
||||
|
||||
policy = NotificationPolicy.find_by(account: User.find(1).account)
|
||||
unless policy.filter_private_mentions == false && policy.filter_not_following == true
|
||||
puts 'Notification policy not migrated as expected'
|
||||
exit(1)
|
||||
end
|
||||
|
||||
puts 'No errors found. Database state is consistent with a successful migration process.'
|
||||
end
|
||||
|
||||
|
@ -181,7 +187,8 @@ namespace :tests do
|
|||
INSERT INTO "settings"
|
||||
(id, thing_type, thing_id, var, value, created_at, updated_at)
|
||||
VALUES
|
||||
(5, 'User', 4, 'default_language', E'--- kmr\n', now(), now());
|
||||
(5, 'User', 4, 'default_language', E'--- kmr\n', now(), now()),
|
||||
(6, 'User', 1, 'interactions', E'--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nmust_be_follower: false\nmust_be_following: true\nmust_be_following_dm: false\n', now(), now());
|
||||
SQL
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue