BUGFIX: spec would blow up when DST kicked in

This commit is contained in:
Sam
2014-03-10 10:11:54 +11:00
parent 68630af718
commit 3f0964bf60

View File

@ -529,16 +529,19 @@ describe Topic do
context 'topic was set to close when it was created' do context 'topic was set to close when it was created' do
it 'puts the autoclose duration in the moderator post' do it 'puts the autoclose duration in the moderator post' do
freeze_time(Time.new(2000,1,1)) do
@topic.created_at = 3.days.ago @topic.created_at = 3.days.ago
@topic.update_status(status, true, @user) @topic.update_status(status, true, @user)
expect(@topic.posts.last.raw).to include "closed after 3 days" expect(@topic.posts.last.raw).to include "closed after 3 days"
end end
end end
end
context 'topic was set to close after it was created' do context 'topic was set to close after it was created' do
it 'puts the autoclose duration in the moderator post' do it 'puts the autoclose duration in the moderator post' do
freeze_time(Time.new(2000,1,1)) do
@topic.created_at = 7.days.ago @topic.created_at = 7.days.ago
Timecop.freeze(2.days.ago) do freeze_time(2.days.ago) do
@topic.set_auto_close(48) @topic.set_auto_close(48)
end end
@topic.update_status(status, true, @user) @topic.update_status(status, true, @user)
@ -547,6 +550,7 @@ describe Topic do
end end
end end
end end
end
describe 'toggle_star' do describe 'toggle_star' do