Skip to content

Commit d0801d5

Browse files
author
Anna
committed
Coerce test to allow for N’varchar
1 parent 9c13c1b commit d0801d5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
require 'cases/sqlserver_helper'
2+
require 'models/post'
3+
require 'models/comment'
4+
5+
module ActiveRecord
6+
class WhereChainTest < ActiveRecord::TestCase
7+
include SqlserverCoercedTest
8+
9+
COERCED_TESTS = [:test_not_eq_with_array_parameter]
10+
11+
def test_coerced_not_eq_with_array_parameter
12+
expected = Arel::Nodes::Not.new("title = N'hello'")
13+
relation = Post.where.not(['title = ?', 'hello'])
14+
assert_equal([expected], relation.where_values)
15+
end
16+
end
17+
end

0 commit comments

Comments
 (0)