diff --git a/test/ephemeral_notifier_test.rb b/test/ephemeral_notifier_test.rb index 1fb2eca..605d46d 100644 --- a/test/ephemeral_notifier_test.rb +++ b/test/ephemeral_notifier_test.rb @@ -17,4 +17,8 @@ class EphemeralNotifierTest < ActiveSupport::TestCase test "ephemeral has record shortcut" do assert_equal :foo, EphemeralNotifier.with(record: :foo).record end + + test "ephemeral notifier includes Rails urls" do + assert_equal "http://localhost:3000/", EphemeralNotifier.new.root_url + end end diff --git a/test/models/noticed/notification_test.rb b/test/models/noticed/notification_test.rb index b2690de..9b84eef 100644 --- a/test/models/noticed/notification_test.rb +++ b/test/models/noticed/notification_test.rb @@ -74,4 +74,12 @@ class Noticed::NotificationTest < ActiveSupport::TestCase test "unseen?" do assert_not noticed_notifications(:one).unseen? end + + test "notification url helpers" do + assert_equal "http://localhost:3000/", CommentNotifier::Notification.new.root_url + end + + test "ephemeral notification url helpers" do + assert_equal "http://localhost:3000/", EphemeralNotifier::Notification.new.root_url + end end diff --git a/test/translation_test.rb b/test/translation_test.rb index 391e88b..8c831c2 100644 --- a/test/translation_test.rb +++ b/test/translation_test.rb @@ -58,4 +58,12 @@ def message block = I18nExample.delivery_methods[:test].config[:message] assert_equal "Hello world", noticed_notifications(:one).instance_exec(&block) end + + test "ephemeral translations" do + assert_equal "Hello world", EphemeralNotifier.new.t("hello") + end + + test "ephemeral notification translations" do + assert_equal "Hello world", EphemeralNotifier::Notification.new.t("hello") + end end