mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 20:54:00 -06:00
18 lines
427 B
Ruby
18 lines
427 B
Ruby
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
|
|
upload = Fabricate(:upload)
|
|
SiteSetting.push_notifications_icon = upload
|
|
|
|
expect(PushNotificationPusher.get_badge)
|
|
.to eq(UrlHelper.absolute(upload.url))
|
|
end
|
|
|
|
end
|