test/integration/navigation_test.rb in merit-1.6.2 vs test/integration/navigation_test.rb in merit-1.7.0

- old
+ new

@@ -75,11 +75,11 @@ assert_equal 0, user.points assert_equal 0, Merit::Score::Point.count user.add_points 15 assert_equal 15, user.points - user.substract_points 15 + user.subtract_points 15 assert_equal 0, user.points assert_equal 2, Merit::Score::Point.count # Make tenth comment, assert 10-commenter badge granted visit '/comments/new' @@ -170,9 +170,18 @@ assert_equal 40, user.points, 'Commenting should grant 20 points if name.length > 4' visit "/comments/#{Comment.last.id}/vote/4" user = User.first assert_equal 46, user.points, 'Voting comments should grant 5 points for voted, and 1 point for voting' + + visit '/comments/new' + fill_in 'Name', with: 'Hi' + fill_in 'Comment', with: '4' + fill_in 'User', with: user.id + click_button('Create Comment') + + user = User.where(name: 'a').first + assert_equal 50, user.points, 'Commenting should grant the integer in comment points if comment is an integer' end test 'user workflow should grant levels at some times' do user = User.create(name: 'test-user') assert user.badges.empty?