mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 23:54:41 +08:00
Add test to verify autoclose moderator post
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user