approvals: move post approval endpoint to /post_approvals.
Move the post approval endpoint from `POST /moderator/post/approval` to `POST /post_approvals`.
This commit is contained in:
@@ -3,11 +3,22 @@ require 'test_helper'
|
||||
class PostApprovalsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The post approvals controller" do
|
||||
setup do
|
||||
@approval = FactoryBot.create(:post_approval)
|
||||
@approver = create(:approver)
|
||||
end
|
||||
|
||||
context "create action" do
|
||||
should "render" do
|
||||
@post = create(:post, is_pending: true)
|
||||
post_auth post_approvals_path(post_id: @post.id, format: :js), @approver
|
||||
|
||||
assert_response :success
|
||||
assert(!@post.reload.is_pending?)
|
||||
end
|
||||
end
|
||||
|
||||
context "index action" do
|
||||
should "render" do
|
||||
@approval = create(:post_approval)
|
||||
get post_approvals_path
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user