Sha256: 920a48ba45553e88510b18d833efa0be0867e8721fc784f36a3e8bb62f91f13e

Contents?: true

Size: 310 Bytes

Versions: 87

Compression:

Stored size: 310 Bytes

Contents

  it "destroy action should destroy model and redirect to index action" do
    <%= singular_name %> = <%= class_name %>.first
    delete :destroy, :id => <%= singular_name %>
    response.should redirect_to(<%= items_path('url') %>)
    <%= class_name %>.exists?(<%= singular_name %>.id).should be_false
  end

Version data entries

87 entries across 66 versions & 13 rubygems

Version Path
very_nifty_generators-0.1.0 lib/generators/nifty/scaffold/templates/tests/rspec/actions/destroy.rb
minerva-nifty-generators-0.3.0 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb
xenda-nifty-generators-0.3.2 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb
ghart-nifty-generators-0.3.0.1 rails_generators/nifty_admin_scaffold/templates/tests/rspec/actions/destroy.rb
ghart-nifty-generators-0.3.0.1 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb
nifty-generators-0.3.0 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb
nifty-generators-0.2.4 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb