Sha256: fc5c892e77a7fd202ea1c7ed44d092b6d907910042d4d11d755ef2b565c0fd23

Contents?: true

Size: 310 Bytes

Versions: 114

Compression:

Stored size: 310 Bytes

Contents

  def test_create_invalid
    <%= class_name %>.any_instance.stubs(:valid?).returns(false)
    post :create
    assert_template 'new'
  end

  def test_create_valid
    <%= class_name %>.any_instance.stubs(:valid?).returns(true)
    post :create
    assert_redirected_to <%= item_path_for_test('url') %>
  end

Version data entries

114 entries across 83 versions & 14 rubygems

Version Path
aslon_scaffold-0.0.15 lib/generators/nifty/aslon/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.15 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.14 lib/generators/nifty/aslon/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.14 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.13 lib/generators/nifty/aslon/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.13 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
tripper-0.0.3d lib/generators/tripper/templates/tests/testunit/actions/create.rb
tripper-0.0.3d lib/generators/tripper/from_community/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.12 lib/generators/nifty/aslon/templates/tests/testunit/actions/create.rb
aslon_scaffold-0.0.12 lib/generators/nifty/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.3.3 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.3.2 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
dust-generators-0.3.1 lib/generators/dust/scaffold/templates/tests/testunit/actions/create.rb
bootstrapped-2.0.4 lib/generators/bootstrapped/scaffold/templates/tests/testunit/actions/create.rb
bootstrapped-2.0.3 lib/generators/bootstrapped/scaffold/templates/tests/testunit/actions/create.rb
bravo-generators-0.1.1 lib/generators/bravo/scaffold/templates/tests/testunit/actions/create.rb
scaffold_logic-2.0.0 lib/generators/scaffold_logic/scaffold/templates/tests/testunit/actions/create.rb
bootstrapped-1.0.1 lib/generators/bootstrapped/scaffold/templates/tests/testunit/actions/create.rb
bootstrapped-1.0.0 lib/generators/bootstrapped/scaffold/templates/tests/testunit/actions/create.rb
bootstrapped-0.9.0 lib/generators/bootstrapped/scaffold/templates/tests/testunit/actions/create.rb