summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-11-05 21:32:26 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-11-05 21:32:26 +0000
commit5f48256c20ccd2e73936343a07c9cfaa851f007b (patch)
treedfc2ccedcaa48bc3466250f0b885f2670b08f154 /test
parent7b77301eabcbd620b4a762d29c71fb800b8d372d (diff)
downloadredmine-5f48256c20ccd2e73936343a07c9cfaa851f007b.tar.gz
redmine-5f48256c20ccd2e73936343a07c9cfaa851f007b.zip
Fixed a typo in Object daddy
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3010 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/exemplars/user_exemplar.rb2
-rw-r--r--test/unit/user_test.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/test/exemplars/user_exemplar.rb b/test/exemplars/user_exemplar.rb
index 154b16d8f..7c4af70b8 100644
--- a/test/exemplars/user_exemplar.rb
+++ b/test/exemplars/user_exemplar.rb
@@ -1,5 +1,5 @@
class User < Principal
- generator_for :login, :method => :next_email
+ generator_for :login, :method => :next_login
generator_for :mail, :method => :next_email
generator_for :firstname, :method => :next_firstname
generator_for :lastname, :method => :next_lastname
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index 1555c0c76..2a4996539 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -25,6 +25,12 @@ class UserTest < ActiveSupport::TestCase
@jsmith = User.find(2)
@dlopper = User.find(3)
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
assert_kind_of User, @jsmith