mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 16:29:32 +08:00
Feature: Push notifications for Android (#5792)
* Feature: Push notifications for Android Notification config for desktop and mobile are merged. Desktop notifications stay as they are for desktop views. If mobile mode, push notifications are enabled. Added push notification subscriptions in their own table, rather than through custom fields. Notification banner prompts appear for both mobile and desktop when enabled.
This commit is contained in:
14
spec/services/push_notification_pusher_spec.rb
Normal file
14
spec/services/push_notification_pusher_spec.rb
Normal file
@ -0,0 +1,14 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe PushNotificationPusher do
|
||||
|
||||
it "returns badges url by default" do
|
||||
expect(PushNotificationPusher.get_badge).to eq("/assets/push-notifications/discourse.png")
|
||||
end
|
||||
|
||||
it "returns custom badges url" do
|
||||
SiteSetting.push_notifications_icon_url = "/test.png"
|
||||
expect(PushNotificationPusher.get_badge).to eq("/test.png")
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user