]> source.dussan.org Git - redmine.git/commitdiff
more strict test to ensure single anonymous user at unit user test
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 22 Sep 2011 09:53:11 +0000 (09:53 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 22 Sep 2011 09:53:11 +0000 (09:53 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7444 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/user_test.rb

index 590e1d28238212dc1ff3aa24120b54d3e036ce0e..f61f23e2f4875938f88e7d3342fa12308927decd 100644 (file)
@@ -475,10 +475,10 @@ class UserTest < ActiveSupport::TestCase
     anon1 = User.anonymous
     assert !anon1.new_record?
     assert_kind_of AnonymousUser, anon1
-    anon1 = AnonymousUser.create(
+    anon2 = AnonymousUser.create(
                 :lastname => 'Anonymous', :firstname => '',
                 :mail => '', :login => '', :status => 0)
-    assert_equal 1, anon1.errors.count
+    assert_equal 1, anon2.errors.count
   end
 
   should_have_one :rss_token