Sha256: 017cc2455567a688b26561079bc180ca001b12f3b2dea65fb47e0382f1a0f77d

Contents?: true

Size: 367 Bytes

Versions: 5

Compression:

Stored size: 367 Bytes

Contents

  def test_update_invalid
    <%= class_name %>.any_instance.stubs(:valid?).returns(false)
    put :update, id: <%= class_name %>.first
    assert_template 'edit'
  end

  def test_update_valid
    <%= class_name %>.any_instance.stubs(:valid?).returns(true)
    put :update, id: <%= class_name %>.first
    assert_redirected_to <%= item_path_for_test('url') %>
  end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zoo-generators-0.1.5 lib/generators/zoo/scaffold/templates/tests/testunit/actions/update.rb
zoo-generators-0.1.4 lib/generators/zoo/scaffold/templates/tests/testunit/actions/update.rb
zoo-generators-0.1.3 lib/generators/zoo/scaffold/templates/tests/testunit/actions/update.rb
zoo-generators-0.1.2 lib/generators/zoo/scaffold/templates/tests/testunit/actions/update.rb
zoo-generators-0.1.1 lib/generators/zoo/scaffold/templates/tests/testunit/actions/update.rb