Skip to content

Commit

Permalink
[fixed] issue publiclab#7269 (publiclab#7280)
Browse files Browse the repository at this point in the history
* [fixed] issue publiclab#7269

* [fixed] failing test cases for publiclab#7269

* [fixed] failing test cases for publiclab#7269
  • Loading branch information
pcube99 authored and Vinit Shahdeo committed Feb 1, 2020
1 parent c60485c commit 678b4ab
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def moderate
user = User.find params[:id]
if logged_in_as(['admin', 'moderator'])
user.moderate
flash[:notice] = 'The user has been moderated.'
else
flash[:error] = 'Only moderators can moderate other users.'
end
Expand Down
2 changes: 1 addition & 1 deletion test/integration/moderate_and_ban_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class ModerateAndBanTest < ActionDispatch::IntegrationTest

assert_response :redirect
follow_redirect!
assert_equal flash[:notice], 'The user has been moderated.'
assert_equal I18n.t('users_controller.user_has_been_moderated'), flash[:warning]
u = User.find(u.id)
assert_equal 5, u.status

Expand Down

0 comments on commit 678b4ab

Please sign in to comment.