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

FIX: broken specs after new link alerting code

This commit is contained in:
Sam 2014-03-18 15:22:39 +11:00
parent 9fd7b0b814
commit 5c26b3dad1
10 changed files with 129 additions and 91 deletions

View file

@ -149,8 +149,13 @@ describe UserAction do
end
describe 'when a user posts a new topic' do
def process_alerts(post)
PostAlerter.post_created(post)
end
before do
@post = Fabricate(:old_post)
process_alerts(@post)
end
describe 'topic action' do
@ -173,6 +178,8 @@ describe UserAction do
@other_user = Fabricate(:coding_horror)
@mentioned = Fabricate(:admin)
@response = Fabricate(:post, reply_to_post_number: 1, topic: @post.topic, user: @other_user, raw: "perhaps @#{@mentioned.username} knows how this works?")
process_alerts(@response)
end
it 'should log user actions correctly' do