Skip to content

Commit d3548bd

Browse files
committed
Add a test
1 parent c3e583b commit d3548bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/cases/adapter_test_sqlserver.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
373373
assert_match(/CREATE VIEW sst_customers_view/, view_info["VIEW_DEFINITION"])
374374
end
375375

376+
it "allows connection#view_information to work with qualified object names" do
377+
view_info = connection.send(:view_information, "[activerecord_unittest].[dbo].[sst_customers_view]")
378+
assert_equal("sst_customers_view", view_info["TABLE_NAME"])
379+
assert_match(/CREATE VIEW sst_customers_view/, view_info["VIEW_DEFINITION"])
380+
end
381+
376382
it "allow the connection#view_table_name method to return true table_name for the view" do
377383
assert_equal "customers", connection.send(:view_table_name, "sst_customers_view")
378384
assert_equal "topics", connection.send(:view_table_name, "topics"), "No view here, the same table name should come back."

0 commit comments

Comments
 (0)