Fixed a typo in Object daddy

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3010 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2009-11-05 21:32:26 +00:00
parent 7b77301eab
commit 5f48256c20
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,5 @@
class User < Principal class User < Principal
generator_for :login, :method => :next_email generator_for :login, :method => :next_login
generator_for :mail, :method => :next_email generator_for :mail, :method => :next_email
generator_for :firstname, :method => :next_firstname generator_for :firstname, :method => :next_firstname
generator_for :lastname, :method => :next_lastname generator_for :lastname, :method => :next_lastname

View File

@ -26,6 +26,12 @@ class UserTest < ActiveSupport::TestCase
@dlopper = User.find(3) @dlopper = User.find(3)
end end
test 'object_daddy creation' do
User.generate_with_protected!(:firstname => 'Testing connection')
User.generate_with_protected!(:firstname => 'Testing connection')
assert_equal 2, User.count(:all, :conditions => {:firstname => 'Testing connection'})
end
def test_truth def test_truth
assert_kind_of User, @jsmith assert_kind_of User, @jsmith
end end