{:ok, [notification, other_notification]} = Notification.create_notifications(activity)
- assert notification.user_id == other_user.id
+ notified_ids = Enum.sort([notification.user_id, other_notification.user_id])
+ assert notified_ids == [other_user.id, third_user.id]
assert notification.activity_id == activity.id
- assert other_notification.user_id == third_user.id
assert other_notification.activity_id == activity.id
end
end
{:ok, activity} = TwitterAPI.create_status(user, %{"status" => "hey @#{other_user.nickname}"})
{:ok, [notification]} = Notification.create_notifications(activity)
- {:error, notification} = Notification.get(user, notification.id)
+ {:error, _notification} = Notification.get(user, notification.id)
end
end
{:ok, activity} = TwitterAPI.create_status(user, %{"status" => "hey @#{other_user.nickname}"})
{:ok, [notification]} = Notification.create_notifications(activity)
- {:error, notification} = Notification.dismiss(user, notification.id)
+ {:error, _notification} = Notification.dismiss(user, notification.id)
end
end