Skip to content

Commit bee31ed

Browse files
author
Anna
committed
updated tests to be consistent with rails 4
1 parent f1b815d commit bee31ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cases/attribute_methods_test_sqlserver.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def test_coerced_read_attributes_before_type_cast_on_datetime
2626

2727
def test_coerced_typecast_attribute_from_select_to_false
2828
topic = Topic.create(:title => 'Budget')
29-
topic = Topic.first(select => "topics.*, CASE WHEN 1=2 THEN 1 ELSE 0 END as is_test")
29+
topic = Topic.all.merge!(select: "topics.*, CASE WHEN 1=2 THEN 1 ELSE 0 END as is_test").first
3030
assert !topic.is_test?
3131
end
3232

3333
def test_coerced_typecast_attribute_from_select_to_true
3434
topic = Topic.create(:title => 'Budget')
35-
topic = Topic.first(:select => "topics.*, CASE WHEN 2=2 THEN 1 ELSE 0 END as is_test")
35+
topic = Topic.all.merge!(select: "topics.*, CASE WHEN 2=2 THEN 1 ELSE 0 END as is_test").first
3636
assert topic.is_test?
3737
end
3838

0 commit comments

Comments
 (0)