mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-14 00:08:46 +00:00
Fix notification policy migration not preserving filter_private_mentions correctly (#29699)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user