Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions test/cases/adapter_test_sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class AdapterTestSQLServer < ActiveRecord::TestCase

it 'has basic and non-senstive information in the adpaters inspect method' do
string = connection.inspect
string.must_match %r{ActiveRecord::ConnectionAdapters::SQLServerAdapter}
string.must_match %r{version\: \d.\d}
string.must_match %r{mode: dblib}
string.must_match %r{azure: (true|false)}
string.wont_match %r{host}
string.wont_match %r{password}
string.wont_match %r{username}
string.wont_match %r{port}
_(string).must_match %r{ActiveRecord::ConnectionAdapters::SQLServerAdapter}
_(string).must_match %r{version\: \d.\d}
_(string).must_match %r{mode: dblib}
_(string).must_match %r{azure: (true|false)}
_(string).wont_match %r{host}
_(string).wont_match %r{password}
_(string).wont_match %r{username}
_(string).wont_match %r{port}
end

it 'has a 128 max #table_alias_length' do
Expand Down Expand Up @@ -161,7 +161,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
end

it 'return an empty array when calling #identity_columns for a table_name with no identity' do
connection.send(:identity_columns, Subscriber.table_name).must_equal []
_(connection.send(:identity_columns, Subscriber.table_name)).must_equal []
end

end
Expand Down Expand Up @@ -303,7 +303,7 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
end

it 'find SSTestCustomersView table name' do
connection.views.must_include 'sst_customers_view'
_(connection.views).must_include 'sst_customers_view'
end

it 'work with dynamic finders' do
Expand Down Expand Up @@ -344,9 +344,9 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
end

it 'find identity column' do
SSTestCustomersView.primary_key.must_equal 'id'
connection.primary_key(SSTestCustomersView.table_name).must_equal 'id'
SSTestCustomersView.columns_hash['id'].must_be :is_identity?
_(SSTestCustomersView.primary_key).must_equal 'id'
_(connection.primary_key(SSTestCustomersView.table_name)).must_equal 'id'
_(SSTestCustomersView.columns_hash['id']).must_be :is_identity?
end

it 'find default values' do
Expand All @@ -371,9 +371,9 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
end

it 'find identity column' do
SSTestStringDefaultsView.primary_key.must_equal 'id'
connection.primary_key(SSTestStringDefaultsView.table_name).must_equal 'id'
SSTestStringDefaultsView.columns_hash['id'].must_be :is_identity?
_(SSTestStringDefaultsView.primary_key).must_equal 'id'
_(connection.primary_key(SSTestStringDefaultsView.table_name)).must_equal 'id'
_(SSTestStringDefaultsView.columns_hash['id']).must_be :is_identity?
end

it 'find default values' do
Expand Down Expand Up @@ -422,8 +422,8 @@ class AdapterTestSQLServer < ActiveRecord::TestCase

it 'in_memory_oltp' do
if ENV['IN_MEMORY_OLTP'] && connection.supports_in_memory_oltp?
SSTMemory.primary_key.must_equal 'id'
SSTMemory.columns_hash['id'].must_be :is_identity?
_(SSTMemory.primary_key).must_equal 'id'
_(SSTMemory.columns_hash['id']).must_be :is_identity?
else
skip 'supports_in_memory_oltp? => false'
end
Expand Down
8 changes: 4 additions & 4 deletions test/cases/change_column_null_test_sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ def find_column(table, name)

describe '#change_column_null' do
it 'does not change the column limit' do
name_column.limit.must_equal 15
_(name_column.limit).must_equal 15
end

it 'does not change the column default' do
code_column.default.must_equal 'n/a'
_(code_column.default).must_equal 'n/a'
end

it 'does not change the column precision' do
value_column.precision.must_equal 32
_(value_column.precision).must_equal 32
end

it 'does not change the column scale' do
value_column.scale.must_equal 8
_(value_column.scale).must_equal 8
end
end
end
Loading