Files
danbooru/test/functional/reports_controller_test.rb
evazion 4f543671a2 tests: move test/helpers to test/test_helpers.
The Rails convention is for test/helpers to be used for testing the view
helpers in app/helpers. We were using it to store certain utility
methods instead. Move these to test/test_helpers so that test/helpers
can be used for its intended purpose.
2018-01-14 16:11:15 -06:00

46 lines
957 B
Ruby

require 'test_helper'
class ReportsControllerTest < ActionController::TestCase
def setup
super
CurrentUser.user = FactoryGirl.create(:mod_user)
CurrentUser.ip_addr = "127.0.0.1"
session[:user_id] = CurrentUser.user.id
@users = FactoryGirl.create_list(:contributor_user, 2)
@posts = @users.map { |u| FactoryGirl.create(:post, uploader: u) }
end
def teardown
super
CurrentUser.user = nil
CurrentUser.ip_addr = nil
session[:user_id] = nil
end
context "The reports controller" do
context "uploads action" do
should "render" do
get :uploads
assert_response :success
end
end
context "similar_users action" do
should "render" do
#get :similar_users
#assert_response :success
end
end
context "post_versions action" do
should "render" do
get :post_versions
assert_response :success
end
end
end
end