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
dust-generators-0.1.8 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.7 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.7 rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.6 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.6 rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.5 rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.5 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.4 rails_generators/dust_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.4 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.3 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.2 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.1 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.1.0 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
nifty-generators-0.4.6 rails_generators/nifty_scaffold/templates/tests/shoulda/actions/destroy.rb
flockonus-nifty-generators-0.0.11 rails_generators/nifty_scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.0.3 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.0.2 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.0.1.pre2 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
dust-generators-0.0.1 lib/generators/dust/scaffold/templates/tests/shoulda/actions/destroy.rb
flockonus-nifty-generators-0.0.10 rails_generators/nifty_scaffold/templates/tests/shoulda/actions/destroy.rb