Permalink
Browse files

Add test for #55

Signed-off-by: David Celis <david@davidcelis.com>
  • Loading branch information...
1 parent 55b43d6 commit bbc2c655d423c662c1cd779b718a2da45a824b45 David Celis committed Oct 11, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 test/recommendable/helpers/calculations_test.rb
@@ -41,7 +41,14 @@ def test_similarity_between_calculates_correctly
end
def test_update_recommendations_ignores_rated_items
+ Recommendable::Helpers::Calculations.update_similarities_for(@user.id)
+ Recommendable::Helpers::Calculations.update_recommendations_for(@user.id)
+ movies = @user.liked_movies + @user.disliked_movies
+ books = @user.liked_books + @user.disliked_books
+
+ movies.each { |m| refute_includes @user.recommended_movies, m }
+ books.each { |b| refute_includes @user.recommended_books, b }
end
def teardown

0 comments on commit bbc2c65

Please sign in to comment.