DEV: Spec shouldn't depend on translation

This commit is contained in:
Gerhard Schlager 2021-07-20 16:03:20 +02:00 committed by Alan Guo Xiang Tan
parent 0d8144b62b
commit 0ea58fe51f
1 changed files with 3 additions and 1 deletions

View File

@ -47,8 +47,10 @@ RSpec.describe PushNotificationPusher do
SiteSetting.allow_user_locale = true
user.update!(locale: 'pt_BR')
TranslationOverride.upsert!("pt_BR", "discourse_push_notifications.popup.mentioned", "pt_BR notification")
Webpush.expects(:payload_send).with do |*args|
args.to_s.include?("system mencionou")
JSON.parse(args.first[:message])["title"] == "pt_BR notification"
end.once
create_subscription