mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Send the user a notification when their post is approved
This commit is contained in:
@@ -57,6 +57,12 @@ RSpec.describe ReviewableQueuedPost, type: :model do
|
||||
expect(Topic.count).to eq(topic_count)
|
||||
expect(Post.count).to eq(post_count + 1)
|
||||
|
||||
notifications = Notification.where(
|
||||
user: reviewable.created_by,
|
||||
notification_type: Notification.types[:post_approved]
|
||||
)
|
||||
expect(notifications).to be_present
|
||||
|
||||
# We can't approve twice
|
||||
expect(-> { reviewable.perform(moderator, :approve) }).to raise_error(Reviewable::InvalidAction)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user