diff --git a/test/fixtures/events.yml b/test/fixtures/events.yml index be738ef67..8fb8dde4f 100644 --- a/test/fixtures/events.yml +++ b/test/fixtures/events.yml @@ -13,6 +13,14 @@ logo_assignment_jz: particulars: <%= { assignee_ids: [ ActiveRecord::FixtureSet.identify(:jz) ] }.to_json %> created_at: <%= 1.week.ago + 1.hour %> +logo_assignment_david: + creator: david + collection: writebook + eventable: logo (Card) + action: card_assigned + particulars: <%= { assignee_ids: [ ActiveRecord::FixtureSet.identify(:david) ] }.to_json %> + created_at: <%= 1.week.ago + 1.hour %> + logo_assignment_km: creator: david collection: writebook diff --git a/test/models/notifier/event_notifier_test.rb b/test/models/notifier/event_notifier_test.rb index 6429874e5..e6340b03f 100644 --- a/test/models/notifier/event_notifier_test.rb +++ b/test/models/notifier/event_notifier_test.rb @@ -65,9 +65,9 @@ class Notifier::EventNotifierTest < ActiveSupport::TestCase end test "assignment events do not notify you if you assigned yourself" do - collections(:writebook).access_for(users(:jz)).access_only! + collections(:writebook).access_for(users(:david)).watching! - notifications = Notifier.for(events(:logo_assignment_jz)).notify + notifications = Notifier.for(events(:logo_assignment_david)).notify assert_empty notifications end