Skip to content

Commit e3aa7f7

Browse files
committed
Test supports_partial_index?.
1 parent 62b1a6f commit e3aa7f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/cases/index_test_sqlserver.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,11 @@ class IndexTestSQLServer < ActiveRecord::TestCase
3232
end
3333
end
3434

35+
it 'add index with where' do
36+
assert_sql(/CREATE.*INDEX.*\(\[last_name\]\) WHERE \[first_name\] = N'john doe'/i) do
37+
connection.add_index 'testings', 'last_name', where: "[first_name] = N'john doe'"
38+
connection.remove_index 'testings', 'last_name'
39+
end
40+
end
41+
3542
end

0 commit comments

Comments
 (0)