Sha256: f34522cd31728d4348cf775393e9b9c93521b3b9fbbc3eeacc41988d6eb10e2c

Contents?: true

Size: 313 Bytes

Versions: 5

Compression:

Stored size: 313 Bytes

Contents

  context "destroy action" do
    should "destroy model and redirect to index action" do
      <%= instance_name %> = <%= class_name %>.first
      delete :destroy, id: <%= instance_name %>
      assert_redirected_to <%= items_url %>
      assert !<%= class_name %>.exists?(<%= instance_name %>.id)
    end
  end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zoo-generators-0.1.5 lib/generators/zoo/scaffold/templates/tests/shoulda/actions/destroy.rb
zoo-generators-0.1.4 lib/generators/zoo/scaffold/templates/tests/shoulda/actions/destroy.rb
zoo-generators-0.1.3 lib/generators/zoo/scaffold/templates/tests/shoulda/actions/destroy.rb
zoo-generators-0.1.2 lib/generators/zoo/scaffold/templates/tests/shoulda/actions/destroy.rb
zoo-generators-0.1.1 lib/generators/zoo/scaffold/templates/tests/shoulda/actions/destroy.rb