Commit c7c877968f0e6d24ac7e2087330b233b2cd34409
1 parent
7e008527
Exists in
master
and in
29 other branches
[postgres-tests] Fixing profile tests
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
test/unit/profile_test.rb
... | ... | @@ -517,7 +517,7 @@ class ProfileTest < ActiveSupport::TestCase |
517 | 517 | |
518 | 518 | should 'be able to create a profile with categories' do |
519 | 519 | pcat = create(Category) |
520 | - c1 = create(Category, :parent_id => pcat) | |
520 | + c1 = create(Category, :parent_id => pcat.id) | |
521 | 521 | c2 = create(Category) |
522 | 522 | |
523 | 523 | profile = create(Profile, :category_ids => [c1.id, c2.id]) |
... | ... | @@ -713,8 +713,8 @@ class ProfileTest < ActiveSupport::TestCase |
713 | 713 | c3 = fast_create(Category, :parent_id => c1.id) |
714 | 714 | profile = fast_create(Profile) |
715 | 715 | profile.category_ids = [c2,c3,c3].map(&:id) |
716 | - assert_equal [c2, c3], profile.categories(true) | |
717 | - assert_equal [c2, c1, c3], profile.categories_including_virtual(true) | |
716 | + assert_equivalent [c2, c3], profile.categories(true) | |
717 | + assert_equivalent [c1, c2, c3], profile.categories_including_virtual(true) | |
718 | 718 | end |
719 | 719 | |
720 | 720 | should 'not return nil members when a member is removed from system' do | ... | ... |