BUGFIX: no reading credit for posts you create

This commit is contained in:
Sam
2014-06-04 11:41:42 +10:00
parent 2eac7128dc
commit c6c412fd45
2 changed files with 23 additions and 3 deletions

View File

@ -429,10 +429,22 @@ describe PostCreator do
embed_url: embed_url,
title: 'Reviews of Science Ovens',
raw: 'Did you know that you can use microwaves to cook your dinner? Science!')
post = creator.create
creator.create
TopicEmbed.where(embed_url: embed_url).exists?.should be_true
end
end
describe "read credit for creator" do
it "should give credit to creator" do
post = create_post
PostTiming.find_by(topic_id: post.topic_id,
post_number: post.post_number,
user_id: post.user_id).msecs.should be > 0
TopicUser.find_by(topic_id: post.topic_id,
user_id: post.user_id).last_read_post_number.should == 1
end
end
end