This commit is contained in:
albert
2010-08-27 16:59:59 -04:00
parent ad39553aac
commit 6bc469b05d
34 changed files with 299 additions and 305 deletions

View File

@@ -1,8 +1,23 @@
require_relative '../test_helper'
class JanitorTrialTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
setup do
user = Factory.create(:user)
CurrentUser.user = user
CurrentUser.ip_addr = "127.0.0.1"
MEMCACHE.flush_all
end
teardown do
CurrentUser.user = nil
CurrentUser.ip_addr = nil
end
should "create a dmail when testing a new janitor" do
admin = Factory.create(:admin_user)
user = Factory.create(:user)
assert_difference("Dmail.count", 2) do
JanitorTrial.create(:user_id => user.id)
end
end
end