app controller: replace calls to access_denied with PrivilegeError.

Standardize controllers to raise User::PrivilegeError instead of calling
`access_denied` directly.
This commit is contained in:
evazion
2019-08-24 22:55:36 -05:00
parent fda9843a55
commit d4c43af1dd
5 changed files with 19 additions and 39 deletions

View File

@@ -23,7 +23,7 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
context "index action" do
should "render for post" do
get comments_path(post_id: @post.id, group_by: "post", format: "js")
get comments_path(post_id: @post.id, group_by: "post", format: "js"), xhr: true
assert_response :success
end