]> source.dussan.org Git - redmine.git/commitdiff
Use create!.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Apr 2012 08:42:32 +0000 (08:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Apr 2012 08:42:32 +0000 (08:42 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9468 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/principal_test.rb

index bc7e9605b416dd74d3f5df0a16edf4296d369110..268e125115c4508dad2685b924c29e7acb489b78 100644 (file)
@@ -49,19 +49,19 @@ class PrincipalTest < ActiveSupport::TestCase
 
   context "#like" do
     setup do
-      Principal.generate!(:login => 'login')
-      Principal.generate!(:login => 'login2')
+      Principal.create!(:login => 'login')
+      Principal.create!(:login => 'login2')
 
-      Principal.generate!(:firstname => 'firstname')
-      Principal.generate!(:firstname => 'firstname2')
+      Principal.create!(:firstname => 'firstname')
+      Principal.create!(:firstname => 'firstname2')
 
-      Principal.generate!(:lastname => 'lastname')
-      Principal.generate!(:lastname => 'lastname2')
+      Principal.create!(:lastname => 'lastname')
+      Principal.create!(:lastname => 'lastname2')
 
-      Principal.generate!(:mail => 'mail@example.com')
-      Principal.generate!(:mail => 'mail2@example.com')
+      Principal.create!(:mail => 'mail@example.com')
+      Principal.create!(:mail => 'mail2@example.com')
 
-      @palmer = Principal.generate!(:firstname => 'David', :lastname => 'Palmer')
+      @palmer = Principal.create!(:firstname => 'David', :lastname => 'Palmer')
     end
 
     should "search login" do