diff --git a/test/unit/profile_suggestion_test.rb b/test/unit/profile_suggestion_test.rb index d2cd3e5..1a016e0 100644 --- a/test/unit/profile_suggestion_test.rb +++ b/test/unit/profile_suggestion_test.rb @@ -204,88 +204,6 @@ class ProfileSuggestionTest < ActiveSupport::TestCase assert_includes suggestions, p3 end -#FIXME This might not be necessary anymore... -# should 'update existing person suggestion when the number of common friends increase' do -# suggested_person = create_user('test_user').person -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_friends => 2) -# -# friend = create_user('friend').person -# friend2 = create_user('friend2').person -# friend3 = create_user('friend2').person -# person.add_friend friend -# person.add_friend friend2 -# person.add_friend friend3 -# -# friend.add_friend suggested_person -# -# suggested_person.add_friend friend -# suggested_person.add_friend friend2 -# suggested_person.add_friend friend3 -# -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_friends', 1 do -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_friends(person), 'people_with_common_friends') -# end -# end -# -# should 'update existing person suggestion when the number of common communities increase' do -# suggested_person = create_user('test_user').person -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_communities => 1) -# -# community.add_member person -# community.add_member suggested_person -# -# community2 = fast_create(Community) -# community2.add_member person -# community2.add_member suggested_person -# -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_communities', 1 do -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_communities(person), 'people_with_common_communities') -# end -# end -# -# should 'update existing person suggestion when the number of common tags increase' do -# suggested_person = create_user('test_user').person -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_tags => 1) -# -# create(Article, :created_by => person, :profile => person, :tag_list => 'first-tag, second-tag, third-tag, fourth-tag') -# create(Article, :created_by => suggested_person, :profile => suggested_person, :tag_list => 'first-tag, second-tag, third-tag') -# -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_tags', 2 do -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_tags(person), 'people_with_common_tags') -# end -# end -# -# should 'update existing community suggestion when the number of common friends increase' do -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => community, :common_friends => 1) -# -# member1 = create_user('member1').person -# member2 = create_user('member2').person -# -# person.add_friend member1 -# person.add_friend member2 -# -# community.add_member member1 -# community.add_member member2 -# -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_friends', 1 do -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.communities_with_common_friends(person), 'communities_with_common_friends') -# end -# -# end -# -# should 'update existing community suggestion when the number of common tags increase' do -# other_person = create_user('test_user').person -# -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => community, :common_tags => 1) -# -# create(Article, :created_by => person, :profile => person, :tag_list => 'first-tag, second-tag, third-tag, fourth-tag') -# create(Article, :created_by => other_person, :profile => community, :tag_list => 'first-tag, second-tag, third-tag') -# -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_tags', 2 do -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.communities_with_common_tags(person), 'communities_with_common_tags') -# end -# end - should 'calculate new suggestions when number of available suggestions reaches the min_limit' do person = create_user('person').person (ProfileSuggestion::MIN_LIMIT + 1).times do -- libgit2 0.21.2