File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
activerecord/test/cases/relation Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -25,20 +25,20 @@ def test_relation_to_sql
25
25
26
26
def test_relation_merging_with_arel_equalities_keeps_last_equality
27
27
devs = Developer . where ( Developer . arel_table [ :salary ] . eq ( 80000 ) ) . merge (
28
- Developer . where ( Developer . arel_table [ :salary ] . eq ( 9000 ) )
29
- )
28
+ Developer . where ( Developer . arel_table [ :salary ] . eq ( 9000 ) )
29
+ )
30
30
assert_equal [ developers ( :poor_jamis ) ] , devs . to_a
31
31
end
32
32
33
33
def test_relation_merging_with_arel_equalities_keeps_last_equality_with_non_attribute_left_hand
34
34
salary_attr = Developer . arel_table [ :salary ]
35
35
devs = Developer . where (
36
- Arel ::Nodes ::NamedFunction . new ( 'abs' , [ salary_attr ] ) . eq ( 80000 )
37
- ) . merge (
38
- Developer . where (
39
- Arel ::Nodes ::NamedFunction . new ( 'abs' , [ salary_attr ] ) . eq ( 9000 )
40
- )
41
- )
36
+ Arel ::Nodes ::NamedFunction . new ( 'abs' , [ salary_attr ] ) . eq ( 80000 )
37
+ ) . merge (
38
+ Developer . where (
39
+ Arel ::Nodes ::NamedFunction . new ( 'abs' , [ salary_attr ] ) . eq ( 9000 )
40
+ )
41
+ )
42
42
assert_equal [ developers ( :poor_jamis ) ] , devs . to_a
43
43
end
44
44
You can’t perform that action at this time.
0 commit comments