Add /post_replacements.json, /posts/1234/replacements.json.

This commit is contained in:
evazion
2017-05-14 18:49:57 -05:00
parent 78b08d8394
commit cb09b6661d
5 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
require 'test_helper'
class PostReplacementsControllerTest < ActionController::TestCase
context "The post replacements controller" do
setup do
@user = FactoryGirl.create(:user, can_approve_posts: true)
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
@post = FactoryGirl.create(:post)
@post_replacement = FactoryGirl.create(:post_replacement, post_id: @post.id)
end
context "index action" do
should "render" do
get :index, {format: :json}
assert_response :success
end
end
end
end