assert_redirected_to login_path(:referer => issues_path)
# Access issues list as normal user
session_for(create(:user))
get issues_path
assert_redirected_to login_path(:referer => issues_path)
# Access issues list as normal user
session_for(create(:user))
get issues_path
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issues list as administrator
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issues list as administrator
assert_redirected_to login_path(:referer => issue_path(issue))
# Access issue as normal user
session_for(create(:user))
get issue_path(:id => issue)
assert_redirected_to login_path(:referer => issue_path(issue))
# Access issue as normal user
session_for(create(:user))
get issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issue as administrator
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issue as administrator
assert_redirected_to login_path(:referer => issue_path(issue))
# Access issue as normal user
session_for(create(:user))
get issue_path(:id => issue)
assert_redirected_to login_path(:referer => issue_path(issue))
# Access issue as normal user
session_for(create(:user))
get issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issue as moderator
assert_redirected_to :controller => :errors, :action => :forbidden
# Access issue as moderator
# Resolve issue as normal user
session_for(create(:user))
post resolve_issue_path(:id => issue)
# Resolve issue as normal user
session_for(create(:user))
post resolve_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Resolve issue as administrator
assert_redirected_to :controller => :errors, :action => :forbidden
# Resolve issue as administrator
session_for(create(:moderator_user))
post resolve_issue_path(:id => issue)
assert_response :redirect
session_for(create(:moderator_user))
post resolve_issue_path(:id => issue)
assert_response :redirect
# Resolve issue as normal user
session_for(create(:user))
post resolve_issue_path(:id => issue)
# Resolve issue as normal user
session_for(create(:user))
post resolve_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Resolve issue as moderator
assert_redirected_to :controller => :errors, :action => :forbidden
# Resolve issue as moderator
session_for(create(:administrator_user))
post resolve_issue_path(:id => issue)
assert_response :redirect
session_for(create(:administrator_user))
post resolve_issue_path(:id => issue)
assert_response :redirect
# Ignore issue as normal user
session_for(create(:user))
post ignore_issue_path(:id => issue)
# Ignore issue as normal user
session_for(create(:user))
post ignore_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Ignore issue as administrator
assert_redirected_to :controller => :errors, :action => :forbidden
# Ignore issue as administrator
session_for(create(:moderator_user))
post ignore_issue_path(:id => issue)
assert_response :redirect
session_for(create(:moderator_user))
post ignore_issue_path(:id => issue)
assert_response :redirect
# Ignore issue as normal user
session_for(create(:user))
post ignore_issue_path(:id => issue)
# Ignore issue as normal user
session_for(create(:user))
post ignore_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Ignore issue as moderator
assert_redirected_to :controller => :errors, :action => :forbidden
# Ignore issue as moderator
session_for(create(:administrator_user))
post ignore_issue_path(:id => issue)
assert_response :redirect
session_for(create(:administrator_user))
post ignore_issue_path(:id => issue)
assert_response :redirect
# Reopen issue as normal user
session_for(create(:user))
post reopen_issue_path(:id => issue)
# Reopen issue as normal user
session_for(create(:user))
post reopen_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Reopen issue as administrator
assert_redirected_to :controller => :errors, :action => :forbidden
# Reopen issue as administrator
session_for(create(:moderator_user))
post reopen_issue_path(:id => issue)
assert_response :redirect
session_for(create(:moderator_user))
post reopen_issue_path(:id => issue)
assert_response :redirect
# Reopen issue as normal user
session_for(create(:user))
post reopen_issue_path(:id => issue)
# Reopen issue as normal user
session_for(create(:user))
post reopen_issue_path(:id => issue)
assert_redirected_to :controller => :errors, :action => :forbidden
# Reopen issue as moderator
assert_redirected_to :controller => :errors, :action => :forbidden
# Reopen issue as moderator
session_for(create(:administrator_user))
post reopen_issue_path(:id => issue)
assert_response :redirect
session_for(create(:administrator_user))
post reopen_issue_path(:id => issue)
assert_response :redirect