diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-15 13:20:55 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-15 13:20:55 +0000 |
commit | 0a97c05ba0fdc8a1179c10869025c9fffcf69d13 (patch) | |
tree | 3a028db63ab92db90c30ab0af6f626fd69d7b2eb /railties/generators | |
parent | 0802ca7095ad539690fdb0eed34312ed5fdcb1a3 (diff) | |
download | rails-0a97c05ba0fdc8a1179c10869025c9fffcf69d13.tar.gz rails-0a97c05ba0fdc8a1179c10869025c9fffcf69d13.tar.bz2 rails-0a97c05ba0fdc8a1179c10869025c9fffcf69d13.zip |
Removed redundent tests for success and removed the tests for missing records that were failing out the gates
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@169 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/generators')
-rw-r--r-- | railties/generators/scaffold/templates/functional_test.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/railties/generators/scaffold/templates/functional_test.rb b/railties/generators/scaffold/templates/functional_test.rb index e82349375b..b7315cfb84 100644 --- a/railties/generators/scaffold/templates/functional_test.rb +++ b/railties/generators/scaffold/templates/functional_test.rb @@ -15,7 +15,6 @@ class <%= class_name %>ControllerTest < Test::Unit::TestCase <% for action in unscaffolded_actions -%> def test_<%= action %> process :<%= action %> - assert_success assert_rendered_file '<%= action %>' end @@ -23,35 +22,25 @@ class <%= class_name %>ControllerTest < Test::Unit::TestCase <% unless suffix -%> def test_index process :index - assert_success assert_rendered_file 'list' end <% end -%> def test_list<%= suffix %> process :list<%= suffix %> - assert_success assert_rendered_file 'list<%= suffix %>' assert_template_has '<%= plural_name %>' end def test_show<%= suffix %> process :show<%= suffix %>, 'id' => 1 - assert_success assert_rendered_file 'show' assert_template_has '<%= singular_name %>' assert_valid_record '<%= singular_name %>' end - def test_show_missing_<%= suffix || 'record' %> - process :show<%= suffix %> - assert_success - assert_rendered_file 'error' - end - def test_new<%= suffix %> process :new<%= suffix %> - assert_success assert_rendered_file 'new<%= suffix %>' assert_template_has '<%= singular_name %>' end @@ -67,29 +56,16 @@ class <%= class_name %>ControllerTest < Test::Unit::TestCase def test_edit<%= suffix %> process :edit<%= suffix %>, 'id' => 1 - assert_success assert_rendered_file 'edit<%= suffix %>' assert_template_has '<%= singular_name %>' assert_valid_record '<%= singular_name %>' end - def test_edit_missing_<%= suffix || 'record' %> - process :edit<%= suffix %> - assert_success - assert_rendered_file 'error' - end - def test_update<%= suffix %> process :update<%= suffix %>, 'id' => 1 assert_redirected_to :action => 'show<%= suffix %>', :id => 1 end - def test_update_missing_<%= suffix || 'record' %> - process :update<%= suffix %>, '<%= singular_name %>' => {} - assert_success - assert_rendered_file 'error' - end - def test_destroy<%= suffix %> assert_not_nil <%= class_name %>.find(1) @@ -100,10 +76,4 @@ class <%= class_name %>ControllerTest < Test::Unit::TestCase <%= singular_name %> = <%= class_name %>.find(1) } end - - def test_destroy_missing_<%= suffix || 'record' %> - process :destroy<%= suffix %> - assert_success - assert_rendered_file 'error' - end end |