Fix test on 1.9.2 postgres.

Multiple records were found and postgres was returning them in a different
order than what the test assumed.
pull/351/head
Eric Davis 14 years ago
parent 3b64c60bc0
commit 85c7cfd0a7
  1. 2
      test/unit/activity_test.rb

@ -79,7 +79,7 @@ class ActivityTest < ActiveSupport::TestCase
assert_kind_of Array, events assert_kind_of Array, events
assert events.include?(Attachment.find_by_container_type_and_container_id('Project', 1).last_journal) assert events.include?(Attachment.find_by_container_type_and_container_id('Project', 1).last_journal)
assert events.include?(Attachment.find_by_container_type_and_container_id('Version', 1).last_journal) assert events.include?(Attachment.find_by_container_type_and_container_id_and_id('Version', 1, 9).last_journal)
assert_equal [Attachment], events.collect(&:journaled).collect(&:class).uniq assert_equal [Attachment], events.collect(&:journaled).collect(&:class).uniq
assert_equal %w(Project Version), events.collect(&:journaled).collect(&:container_type).uniq.sort assert_equal %w(Project Version), events.collect(&:journaled).collect(&:container_type).uniq.sort
end end

Loading…
Cancel
Save