test/functional/sites_controller_test.rb in zena-1.0.0.rc3 vs test/functional/sites_controller_test.rb in zena-1.0.0
- old
+ new
@@ -14,11 +14,11 @@
assert !File.exist?(filepath)
secure!(CachedPage) { CachedPage.create(:expire_after => nil, :path => "/test.host/public/en/clear_cache_test.html", :content_data => "houbahouba", :node_id => @node[:id], :expire_with_ids => visitor.visited_node_ids) }
assert File.exist?(filepath)
assert CachedPage.find(:first, :conditions => ["path = ?", "/test.host/public/en/clear_cache_test.html"])
login(:lion)
- post 'clear_cache', :id => visitor.site.id
+ post 'action', :do => 'clear_cache', :id => visitor.site.id
assert !File.exist?(filepath)
assert !CachedPage.find(:first, :conditions => ["path = ?", "/test.host/public/en/clear_cache_test.html"])
end
end
@@ -29,10 +29,10 @@
filepath = "#{RAILS_ROOT}/sites/test.host/zafu/default/Node/fr/_main.erb"
FileUtils.mkpath(File.dirname(filepath))
File.open(filepath, 'wb') {|f| f.puts "puts 'hello'"}
assert File.exist?(filepath)
login(:lion)
- post 'clear_cache', :id => visitor.site.id
+ post 'action', :do => 'clear_cache', :id => visitor.site.id
assert !File.exist?(filepath)
end
end
test "should not have access to sites if not admin" do
\ No newline at end of file