File tree 2 files changed +23
-0
lines changed
spec/controllers/refinery/admin
2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,12 @@ def expire_page_caching
186
186
return true # so that other callbacks process.
187
187
end
188
188
end
189
+
190
+ def rebuild_with_invalidate_cached_urls!
191
+ rebuild_without_invalidate_cached_urls!
192
+ find_each { |page | page . send :invalidate_cached_urls }
193
+ end
194
+ alias_method_chain :rebuild! , :invalidate_cached_urls
189
195
end
190
196
191
197
# The canonical page for this particular page.
Original file line number Diff line number Diff line change
1
+ require "spec_helper"
2
+
3
+ module Refinery
4
+ module Admin
5
+ describe PagesController , :focus => true do
6
+ login_refinery_superuser
7
+
8
+ describe "#update_positions" do
9
+ it "calls .rebuild! on Refinery::Page" do
10
+ Refinery ::Page . should_receive ( :rebuild! ) . once
11
+
12
+ post :update_positions , :ul => [ ]
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
You can’t perform that action at this time.
0 commit comments