Skip to content

Commit

Permalink
Add test for notification_methods
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Jan 15, 2024
1 parent f8e0f8c commit 0e186a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/notifier_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 0e186a4

Please sign in to comment.