Sha256: 41a92c6aaf4e583dd4b3adc17933b0f32db5aac98eb4facb009fefc985e1ddc7

Contents?: true

Size: 324 Bytes

Versions: 104

Compression:

Stored size: 324 Bytes

Contents

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

Version data entries

104 entries across 83 versions & 16 rubygems

Version Path
intinno-nifty-generators-0.2.5 rails_generators/nifty_scaffold/templates/tests/shoulda/actions/destroy.rb
rubycs-nifty-generators-compass-0.0.1 rails_generators/nifty_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.3.3 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.3.2 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.3.1 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-2.0.0 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.9 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.8 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.7 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.6 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.5 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.4 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.3 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.2 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.1 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.7.0 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.6.3 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.6.2 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.6.1 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb
scaffold_logic-1.6.0 lib/generators/scaffold_logic/scaffold/templates/tests/shoulda/actions/destroy.rb