Skip to content

Commit

Permalink
adding a test for #1322
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 26, 2011
1 parent 602fff1 commit d1c7470
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions activerecord/test/cases/associations/eager_test.rb
Expand Up @@ -380,6 +380,21 @@ def test_eager_load_has_many_with_string_keys
assert_equal subscriptions, subscriber.subscriptions.sort_by(&:id)
end

def test_string_id_column_joins
s = Subscriber.create! do |c|
c.id = "PL"
end

b = Book.create! do |t|
t.id = "UE"
end

Subscription.create!(:subscriber_id => "PL", :book_id => "UE")
s.reload
s.books
s.book_ids = s.book_ids
end

def test_eager_load_has_many_through_with_string_keys
books = books(:awdr, :rfr)
subscriber = Subscriber.find(subscribers(:second).id, :include => :books)
Expand Down

0 comments on commit d1c7470

Please sign in to comment.