From 0ea58fe51fe7bdfdc573d01e393592b73ffb49b8 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Tue, 20 Jul 2021 16:03:20 +0200 Subject: [PATCH] DEV: Spec shouldn't depend on translation --- spec/services/push_notification_pusher_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/services/push_notification_pusher_spec.rb b/spec/services/push_notification_pusher_spec.rb index 62ae1cfc93..851675cf34 100644 --- a/spec/services/push_notification_pusher_spec.rb +++ b/spec/services/push_notification_pusher_spec.rb @@ -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