spec/models/landable/template_spec.rb in landable-1.9.0.rc1 vs spec/models/landable/template_spec.rb in landable-1.9.0.rc2
- old
+ new
@@ -70,9 +70,18 @@
template.publish! author: author
revision1 = template.published_revision
template.publish! author: author
revision1.is_published.should be_false
end
+
+ it 'should call republish_associated_pages' do
+ page = create :page
+ template.pages = [page]
+ template.save!
+
+ template.should_receive(:republish_associated_pages)
+ template.publish! author: author
+ end
end
describe '#revert_to' do
let(:template) { FactoryGirl.create :template }
let(:author) { FactoryGirl.create :author }