From 5f48256c20ccd2e73936343a07c9cfaa851f007b Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 5 Nov 2009 21:32:26 +0000 Subject: [PATCH] Fixed a typo in Object daddy git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3010 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/exemplars/user_exemplar.rb | 2 +- test/unit/user_test.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/exemplars/user_exemplar.rb b/test/exemplars/user_exemplar.rb index 154b16d8..7c4af70b 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 1555c0c7..2a499653 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