test/recommendable/rater_test.rb in recommendable-2.1.1 vs test/recommendable/rater_test.rb in recommendable-2.1.2

- old
+ new

@@ -21,9 +21,20 @@ def test_that_rated_anything_is_false_by_default refute @user.rated_anything? end + def test_that_unrate_removes_any_rating + @movie = Factory(:movie) + %w[like dislike hide bookmark].each do |action| + @user.send(action, @movie) + assert @user.send("#{action.pluralize}?", @movie) + + @user.unrate(@movie) + refute @user.send("#{action.pluralize}?", @movie) + end + end + def teardown Recommendable.redis.flushdb end end