diff --git a/config/locales/controllers/en.yml b/config/locales/controllers/en.yml index 127682d5e8..9e48df3a24 100644 --- a/config/locales/controllers/en.yml +++ b/config/locales/controllers/en.yml @@ -1,6 +1,9 @@ --- en: admin: + access: + action_access_denied: Sorry, only an authorized admin can do that. + page_access_denied: Sorry, only an authorized admin can access the page you were trying to reach. admin_invitations: find: user_not_found: No results were found. Try another search. @@ -8,9 +11,6 @@ en: success: one: "%{count} person from the invite queue is being invited." other: "%{count} people from the invite queue are being invited." - access: - page_access_denied: Sorry, only an authorized admin can access the page you were trying to reach. - action_access_denied: Sorry, only an authorized admin can do that. blocked: users: create: diff --git a/spec/controllers/inbox_controller_spec.rb b/spec/controllers/inbox_controller_spec.rb index c24c640f09..68551d0b3e 100644 --- a/spec/controllers/inbox_controller_spec.rb +++ b/spec/controllers/inbox_controller_spec.rb @@ -294,36 +294,36 @@ it "marks all as read and redirects to inbox with a notice" do parameters = { user_id: user.login, - inbox_comments: [inbox_comment_1.id, inbox_comment_2.id], + inbox_comments: [inbox_comment1.id, inbox_comment2.id], read: "yeah" } put :update, params: parameters it_redirects_to_with_notice(user_inbox_path(user), "Inbox successfully updated.") - inbox_comment_1.reload - expect(inbox_comment_1.read).to be_truthy - inbox_comment_2.reload - expect(inbox_comment_2.read).to be_truthy + inbox_comment1.reload + expect(inbox_comment1.read).to be_truthy + inbox_comment2.reload + expect(inbox_comment2.read).to be_truthy end it "marks one as read and redirects to inbox with a notice" do - put :update, params: { user_id: user.login, inbox_comments: [inbox_comment_1.id], read: "yeah" } + put :update, params: { user_id: user.login, inbox_comments: [inbox_comment1.id], read: "yeah" } it_redirects_to_with_notice(user_inbox_path(user), "Inbox successfully updated.") - inbox_comment_1.reload - expect(inbox_comment_1.read).to be_truthy - inbox_comment_2.reload - expect(inbox_comment_2.read).to be_falsy + inbox_comment1.reload + expect(inbox_comment1.read).to be_truthy + inbox_comment2.reload + expect(inbox_comment2.read).to be_falsy end it "deletes one and redirects to inbox with a notice" do - put :update, params: { user_id: user.login, inbox_comments: [inbox_comment_1.id], delete: "yeah" } + put :update, params: { user_id: user.login, inbox_comments: [inbox_comment1.id], delete: "yeah" } it_redirects_to_with_notice(user_inbox_path(user), "Inbox successfully updated.") - expect(InboxComment.find_by(id: inbox_comment_1.id)).to be_nil - inbox_comment_2.reload - expect(inbox_comment_2.read).to be_falsy + expect(InboxComment.find_by(id: inbox_comment1.id)).to be_nil + inbox_comment2.reload + expect(inbox_comment2.read).to be_falsy end end