mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Merge pull request #3357 from rahul100885/rahul100885_ws
Added test case for postgresql database
This commit is contained in:
@@ -143,6 +143,16 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_config_postgresql_database
|
||||
run_generator([destination_root, "-d", "postgresql"])
|
||||
assert_file "config/database.yml", /postgresql/
|
||||
unless defined?(JRUBY_VERSION)
|
||||
assert_file "Gemfile", /^gem\s+["']pg["']$/
|
||||
else
|
||||
assert_file "Gemfile", /^gem\s+["']activerecord-jdbcpostgresql-adapter["']$/
|
||||
end
|
||||
end
|
||||
|
||||
def test_config_jdbcmysql_database
|
||||
run_generator([destination_root, "-d", "jdbcmysql"])
|
||||
assert_file "config/database.yml", /mysql/
|
||||
|
||||
Reference in New Issue
Block a user