Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure the scaffold tests will pass when using references attributes

  • Loading branch information...
commit 190f638d398edf70fef0c32a389ed84a449bccb8 1 parent 95ccbd8
@rafaelfranca authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 railties/test/application/rake_test.rb
View
10 railties/test/application/rake_test.rb
@@ -195,6 +195,16 @@ def test_scaffold_tests_pass_by_default
assert_no_match(/Errors running/, output)
end
+ def test_scaffold_with_references_columns_tests_pass_by_default
+ output = Dir.chdir(app_path) do
+ `rails generate scaffold LineItems product:references cart:belongs_to;
+ bundle exec rake db:migrate db:test:clone test`
+ end
+
+ assert_match(/7 tests, 13 assertions, 0 failures, 0 errors/, output)
+ assert_no_match(/Errors running/, output)
+ end
+
def test_db_test_clone_when_using_sql_format
add_to_config "config.active_record.schema_format = :sql"
output = Dir.chdir(app_path) do
Please sign in to comment.
Something went wrong with that request. Please try again.