From 0e186a4d06831f77f308741bc0b8760443c06438 Mon Sep 17 00:00:00 2001 From: Chris Oliver Date: Mon, 15 Jan 2024 14:25:30 -0600 Subject: [PATCH] Add test for notification_methods --- test/notifier_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/notifier_test.rb b/test/notifier_test.rb index d5e0a2a5..584a366f 100644 --- a/test/notifier_test.rb +++ b/test/notifier_test.rb @@ -11,6 +11,12 @@ class NotifierTest < ActiveSupport::TestCase assert_equal [:message], InheritedNotifier.required_params end + test "notification_methods adds methods to Noticed::Notifications" do + user = users(:one) + event = SimpleNotifier.with(message: "test").deliver(user) + assert_equal "hello #{user.email}", event.notifications.last.message + end + test "serializes globalid objects with text column" do user = users(:one) notification = Noticed::Event.create!(type: "SimpleNotifier", params: {user: user})