- # Test 'Ignored'
- get :ignore, :params => { :id => issue.id }
- assert_equal true, Issue.find_by(:reportable_id => target_user, :reportable_type => "User").ignored?
+ # Reopen issue as normal user
+ session[:user] = create(:user).id
+ get :reopen, :params => { :id => issue.id }
+ assert_response :redirect
+ assert_redirected_to root_path
+
+ # Reopen issue as administrator
+ session[:user] = create(:administrator_user).id
+ get :reopen, :params => { :id => issue.id }
+ assert_response :redirect
+ assert_equal true, issue.reload.open?
+
+ issue.resolve!
+
+ # Reopen issue as moderator
+ session[:user] = create(:moderator_user).id
+ get :reopen, :params => { :id => issue.id }