<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -33,13 +33,11 @@
     &lt;% end -%&gt;
 
     &lt;% if logged_in? and @at_least_a_moderator -%&gt;
-    &lt;% cache({:part =&gt; 'delete', :id =&gt; @cache_id}) do -%&gt;
     &lt;li&gt;&lt;%= link_to &quot;Delete&quot;,
             {:action =&gt; :destroy,
-             :id =&gt; item},
+             :id =&gt; @cache_id},
       :method =&gt; :post,
       :confirm =&gt; 'Are you sure?', :tabindex =&gt; '1' %&gt;&lt;/li&gt;
-    &lt;% end %&gt;
     &lt;% end -%&gt;
                 &lt;%= render :partial =&gt; 'topics/privacy_chooser', :locals =&gt; { :item =&gt; item } if @show_privacy_chooser -%&gt;
   &lt;/ul&gt;</diff>
      <filename>app/views/topics/_actions_menu.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,32 @@ require File.dirname(__FILE__) + '/integration_test_helper'
 
 class ItemFormTest &lt; ActionController::IntegrationTest
 
-# test each item add/edit/delete forms
+  # test each item add/edit/delete forms
+
+  context &quot;The delete functionality in production mode&quot; do
+
+    setup do
+      enable_production_mode
+      add_paul_as_super_user
+      add_jane_as_super_user
+      login_as(:paul)
+      @topic = new_topic({ :title =&gt; 'Delete link test' })
+    end
+
+    teardown do
+      disable_production_mode
+    end
+
+    should &quot;work when different authorized people view it&quot; do
+      visit &quot;/#{@topic.basket.urlified_name}/topics/show/#{@topic.id}&quot;
+      login_as(:jane)
+      visit &quot;/#{@topic.basket.urlified_name}/topics/show/#{@topic.id}&quot;
+      click_link 'Delete'
+      body_should_contain 'Refine your results'
+      visit &quot;/#{@topic.basket.urlified_name}/topics/show/#{@topic.id}&quot;
+      body_should_contain '404 Error!'
+    end
+
+  end
 
 end</diff>
      <filename>test/integration/item_form_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>22bfb0a58d6f1e0ce8455f292f7e1a99d95b5f0b</id>
    </parent>
  </parents>
  <author>
    <name>Kieran Pilkington</name>
    <email>kieran@katipo.co.nz</email>
  </author>
  <url>http://github.com/kete/kete/commit/ca291e81ddafedfe2da3e0ec76d9b1c5f50a59be</url>
  <id>ca291e81ddafedfe2da3e0ec76d9b1c5f50a59be</id>
  <committed-date>2009-07-02T18:01:20-07:00</committed-date>
  <authored-date>2009-07-02T18:01:20-07:00</authored-date>
  <message>Merged in c5bb56bf285a5447d3b1974b0cac82adcf94f2bf - Fix for delete link in production mode</message>
  <tree>f2e748ceaa4282747a45414c0f988c5f3b701410</tree>
  <committer>
    <name>Kieran Pilkington</name>
    <email>kieran@katipo.co.nz</email>
  </committer>
</commit>
