test/integration/navigation_test.rb in merit-1.3.1 vs test/integration/navigation_test.rb in merit-1.4.0

- old
+ new

@@ -16,10 +16,11 @@ badge = Badge.first user.add_badge badge.id user.add_badge badge.id assert_equal [badge, badge], user.badges + assert_equal [user], badge.users user.rm_badge badge.id assert_equal [badge], user.reload.badges end @@ -187,7 +188,21 @@ user = User.where(:name => 'abcde').first Merit::RankRules.new.check_rank_rules user.reload assert_equal 5, user.level, "User level should be 5." + end + + test 'assigning points to a group of records' do + commenter = User.create(:name => 'commenter') + comment_1 = commenter.comments.create(:name => 'comment_1', :comment => 'a') + comment_2 = commenter.comments.create(:name => 'comment_2', :comment => 'b') + + visit comments_path + within "tr#c_#{comment_2.id}" do + click_link '1' + end + + comment_1.reload.points.must_be :==, 2 + comment_2.reload.points.must_be :==, 2 end end