Commit e2526022d80d944a52ac7e02990ec00b74ced8dd

Authored by Rodrigo Souto
1 parent f862eb4f

profile-suggestions-test: remove obsolete code

Showing 1 changed file with 0 additions and 82 deletions   Show diff stats
test/unit/profile_suggestion_test.rb
... ... @@ -204,88 +204,6 @@ class ProfileSuggestionTest < ActiveSupport::TestCase
204 204 assert_includes suggestions, p3
205 205 end
206 206  
207   -#FIXME This might not be necessary anymore...
208   -# should 'update existing person suggestion when the number of common friends increase' do
209   -# suggested_person = create_user('test_user').person
210   -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_friends => 2)
211   -#
212   -# friend = create_user('friend').person
213   -# friend2 = create_user('friend2').person
214   -# friend3 = create_user('friend2').person
215   -# person.add_friend friend
216   -# person.add_friend friend2
217   -# person.add_friend friend3
218   -#
219   -# friend.add_friend suggested_person
220   -#
221   -# suggested_person.add_friend friend
222   -# suggested_person.add_friend friend2
223   -# suggested_person.add_friend friend3
224   -#
225   -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_friends', 1 do
226   -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_friends(person), 'people_with_common_friends')
227   -# end
228   -# end
229   -#
230   -# should 'update existing person suggestion when the number of common communities increase' do
231   -# suggested_person = create_user('test_user').person
232   -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_communities => 1)
233   -#
234   -# community.add_member person
235   -# community.add_member suggested_person
236   -#
237   -# community2 = fast_create(Community)
238   -# community2.add_member person
239   -# community2.add_member suggested_person
240   -#
241   -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_communities', 1 do
242   -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_communities(person), 'people_with_common_communities')
243   -# end
244   -# end
245   -#
246   -# should 'update existing person suggestion when the number of common tags increase' do
247   -# suggested_person = create_user('test_user').person
248   -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => suggested_person, :common_tags => 1)
249   -#
250   -# create(Article, :created_by => person, :profile => person, :tag_list => 'first-tag, second-tag, third-tag, fourth-tag')
251   -# create(Article, :created_by => suggested_person, :profile => suggested_person, :tag_list => 'first-tag, second-tag, third-tag')
252   -#
253   -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_tags', 2 do
254   -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.people_with_common_tags(person), 'people_with_common_tags')
255   -# end
256   -# end
257   -#
258   -# should 'update existing community suggestion when the number of common friends increase' do
259   -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => community, :common_friends => 1)
260   -#
261   -# member1 = create_user('member1').person
262   -# member2 = create_user('member2').person
263   -#
264   -# person.add_friend member1
265   -# person.add_friend member2
266   -#
267   -# community.add_member member1
268   -# community.add_member member2
269   -#
270   -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_friends', 1 do
271   -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.communities_with_common_friends(person), 'communities_with_common_friends')
272   -# end
273   -#
274   -# end
275   -#
276   -# should 'update existing community suggestion when the number of common tags increase' do
277   -# other_person = create_user('test_user').person
278   -#
279   -# suggestion = ProfileSuggestion.create(:person => person, :suggestion => community, :common_tags => 1)
280   -#
281   -# create(Article, :created_by => person, :profile => person, :tag_list => 'first-tag, second-tag, third-tag, fourth-tag')
282   -# create(Article, :created_by => other_person, :profile => community, :tag_list => 'first-tag, second-tag, third-tag')
283   -#
284   -# assert_difference 'ProfileSuggestion.find(suggestion.id).common_tags', 2 do
285   -# ProfileSuggestion.register_suggestions(person, ProfileSuggestion.communities_with_common_tags(person), 'communities_with_common_tags')
286   -# end
287   -# end
288   -
289 207 should 'calculate new suggestions when number of available suggestions reaches the min_limit' do
290 208 person = create_user('person').person
291 209 (ProfileSuggestion::MIN_LIMIT + 1).times do
... ...