Sha256: 306864ec7a44e967309fb2717178724e3d7ad9dc00c65755cf1430eecf221e59

Contents?: true

Size: 317 Bytes

Versions: 2

Compression:

Stored size: 317 Bytes

Contents

  it "destroy action should destroy model and redirect to index action" do
    <%= singular_name %> = Factory(:<%= singular_name %>)
    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

2 entries across 2 versions & 2 rubygems

Version Path
linki-nifty-generators-0.3.1 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb
linki-nifty_generators-0.3.1 rails_generators/nifty_scaffold/templates/tests/rspec/actions/destroy.rb