|
|
@@ -4,7 +4,8 @@ |
|
|
include LoginMacros
|
|
|
include RedirectExpectationHelper
|
|
|
let(:admin) { create(:admin) }
|
|
|
- let(:user) { create(:user) }
|
|
|
+
|
|
|
+ before { fake_logout }
|
|
|
|
|
|
describe "GET #index" do
|
|
|
it "renders" do
|
|
|
@@ -85,7 +86,7 @@ |
|
|
delete :destroy, params: { id: 0 }
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
|
|
|
- fake_login_known_user(user)
|
|
|
+ fake_login
|
|
|
delete :destroy, params: { id: 0 }
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
end
|
|
|
@@ -113,11 +114,10 @@ |
|
|
it_redirects_to_with_error(manage_invite_requests_path, "Request could not be removed. Please try again.")
|
|
|
end
|
|
|
|
|
|
- xit "redirects to manage with error when request cannot be found" do
|
|
|
- # TODO: AO3-4971
|
|
|
+ it "redirects to manage with notice when request cannot be found" do
|
|
|
invite_request.destroy
|
|
|
delete :destroy, params: { id: invite_request.id }
|
|
|
- # it_redirects_to_with_error(manage_invite_requests_path, "?")
|
|
|
+ it_redirects_to_with_notice(manage_invite_requests_path, "Request was removed from the queue.")
|
|
|
end
|
|
|
end
|
|
|
|
|
|
@@ -145,7 +145,7 @@ |
|
|
get :manage
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
|
|
|
- fake_login_known_user(user)
|
|
|
+ fake_login
|
|
|
get :manage
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
end
|
|
|
@@ -170,7 +170,7 @@ |
|
|
post :reorder
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
|
|
|
- fake_login_known_user(user)
|
|
|
+ fake_login
|
|
|
post :reorder
|
|
|
it_redirects_to_with_notice(root_path, "I'm sorry, only an admin can look at that area")
|
|
|
end
|
|
|
|