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:
@@ -1,25 +0,0 @@
|
||||
require 'test_helper'
|
||||
|
||||
module Moderator
|
||||
module Post
|
||||
class ApprovalsControllerTest < ActionDispatch::IntegrationTest
|
||||
context "The moderator post approvals controller" do
|
||||
setup do
|
||||
@admin = create(:admin_user)
|
||||
as_admin do
|
||||
@post = create(:post, :is_pending => true)
|
||||
end
|
||||
end
|
||||
|
||||
context "create action" do
|
||||
should "render" do
|
||||
post_auth moderator_post_approval_path, @admin, params: {:post_id => @post.id, :format => "js"}
|
||||
assert_response :success
|
||||
@post.reload
|
||||
assert(!@post.is_pending?)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user