Permalink
Browse files

Merge pull request #27695 from metaskills/sqlserver-testparticipation

Allow SQLServerAdapter To Opt Into A Few Tests
  • Loading branch information...
eileencodes committed Jan 16, 2017
2 parents 41e218d + 9848730 commit 39c1da1316dada5f7b2adda39a1dbbba06a06442
@@ -73,7 +73,7 @@ def test_schema_dump_includes_datetime_precision
assert_match %r{t\.datetime\s+"updated_at",\s+precision: 6,\s+null: false$}, output
end
- if current_adapter?(:PostgreSQLAdapter)
+ if current_adapter?(:PostgreSQLAdapter, :SQLServerAdapter)
def test_datetime_precision_with_zero_should_be_dumped
@connection.create_table(:foos, force: true) do |t|
t.timestamps precision: 0
@@ -68,7 +68,7 @@ def test_schema_dump_includes_time_precision
assert_match %r{t\.time\s+"finish",\s+precision: 6$}, output
end
- if current_adapter?(:PostgreSQLAdapter)
+ if current_adapter?(:PostgreSQLAdapter, :SQLServerAdapter)
def test_time_precision_with_zero_should_be_dumped
@connection.create_table(:foos, force: true) do |t|
t.time :start, precision: 0
@@ -154,7 +154,7 @@ def test_does_not_dump_view_as_table
end
# sqlite dose not support CREATE, INSERT, and DELETE for VIEW
- if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
+ if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter, :SQLServerAdapter)
class UpdateableViewTest < ActiveRecord::TestCase
self.use_transactional_tests = false
fixtures :books
@@ -200,7 +200,7 @@ def test_update_record_to_fail_view_conditions
end
end
end
- end # end of `if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)`
+ end # end of `if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter, :SQLServerAdapter)`
end # end of `if ActiveRecord::Base.connection.supports_views?`
if ActiveRecord::Base.connection.respond_to?(:supports_materialized_views?) &&

0 comments on commit 39c1da1

Please sign in to comment.