Commit ae3d5426 authored by Eric Davis's avatar Eric Davis

Merged r3905 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@3955 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent c731d112
......@@ -195,11 +195,7 @@ class AccountControllerTest < ActionController::TestCase
should_assign_to :user
should_redirect_to('my page') { {:controller => 'my', :action => 'account'} }
should "create a new user" do
user = User.last(:conditions => {:login => 'register'})
assert user
assert_kind_of User, user
end
should_create_a_new_user { User.last(:conditions => {:login => 'register'}) }
should 'set the user status to active' do
user = User.last(:conditions => {:login => 'register'})
......
......@@ -162,4 +162,13 @@ class ActiveSupport::TestCase
end
end
end
def self.should_create_a_new_user(&block)
should "create a new user" do
user = instance_eval &block
assert user
assert_kind_of User, user
assert !user.new_record?
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment