Skip to content

Commit

Permalink
adding more tests surrounding where values hash
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Nov 30, 2010
1 parent 9f2e885 commit 76a15dd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions activerecord/test/cases/relation_scoping_test.rb
Expand Up @@ -469,6 +469,17 @@ def test_default_scope_attribute
assert_equal 50000, jamis.salary
end

def test_where_attribute
aaron = PoorDeveloperCalledJamis.where(:salary => 20).new(:name => 'Aaron')
assert_equal 20, aaron.salary
assert_equal 'Aaron', aaron.name
end

def test_where_attribute_merge
aaron = PoorDeveloperCalledJamis.where(:name => 'foo').new(:name => 'Aaron')
assert_equal 'Aaron', aaron.name
end

def test_scope_composed_by_limit_and_then_offset_is_equal_to_scope_composed_by_offset_and_then_limit
posts_limit_offset = Post.limit(3).offset(2)
posts_offset_limit = Post.offset(2).limit(3)
Expand Down

0 comments on commit 76a15dd

Please sign in to comment.