2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

Notification created for wrong user after invite.

Introduced in c64f09b6b7
This commit is contained in:
Guo Xiang Tan 2018-02-26 13:19:52 +08:00
parent 6c1c5fe2d6
commit 6a88f7db61
2 changed files with 19 additions and 9 deletions

View file

@ -546,6 +546,13 @@ describe Topic do
expect(topic.invite(topic.user, walter.username)).to eq(true)
expect(topic.allowed_users.include?(walter)).to eq(true)
notification = Notification.last
expect(notification.user).to eq(walter)
expect(notification.notification_type)
.to eq(Notification.types[:invited_to_private_message])
expect(topic.remove_allowed_user(topic.user, walter.username)).to eq(true)
topic.reload
expect(topic.allowed_users.include?(walter)).to eq(false)