From be234a2bc739ea8a42d41072d2821136725c6be8 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Mon, 27 May 2013 17:59:43 -0700 Subject: [PATCH] Add test to verify autoclose moderator post --- spec/models/topic_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index 262a0064d..6e3819e31 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -630,6 +630,13 @@ describe Topic do context 'autoclosed' do let(:status) { 'autoclosed' } 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