Add test to verify autoclose moderator post

This commit is contained in:
Chris Hunt 2013-05-27 17:59:43 -07:00
parent 54a798eb12
commit be234a2bc7

View file

@ -630,6 +630,13 @@ describe Topic do
context 'autoclosed' do context 'autoclosed' do
let(:status) { 'autoclosed' } let(:status) { 'autoclosed' }
it_should_behave_like 'a status that closes a topic' it_should_behave_like 'a status that closes a topic'
it 'puts the autoclose duration in the moderator post' do
@topic.created_at = 3.days.ago
@topic.update_status(status, true, @user)
expect(@topic.posts.last.raw).to include "closed after 3 days"
end
end end