]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/user_test.rb
Don't send note comment notifications to deleted users
[rails.git] / test / models / user_test.rb
index 59445aee451e6382fb12f4bf18cb419c81ce0b7f..b3e6eae8f702f144bef52eb3f488346069b9ed3b 100644 (file)
@@ -163,7 +163,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_visible
-    assert_equal 16, User.visible.count
+    assert_equal 19, User.visible.count
     assert_raise ActiveRecord::RecordNotFound do
       User.visible.find(users(:suspended_user).id)
     end
@@ -173,7 +173,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_active
-    assert_equal 15, User.active.count
+    assert_equal 18, User.active.count
     assert_raise ActiveRecord::RecordNotFound do
       User.active.find(users(:inactive_user).id)
     end
@@ -186,7 +186,7 @@ class UserTest < ActiveSupport::TestCase
   end
 
   def test_identifiable
-    assert_equal 17, User.identifiable.count
+    assert_equal 20, User.identifiable.count
     assert_raise ActiveRecord::RecordNotFound do
       User.identifiable.find(users(:normal_user).id)
     end
@@ -200,6 +200,8 @@ class UserTest < ActiveSupport::TestCase
     user.languages = %w(fr de sl)
     assert_equal "de", user.preferred_language
     assert_equal "de", user.preferred_language_from(%w(en sl de es))
+    user = users(:public_user)
+    assert_equal %w(en de), user.languages
   end
 
   def test_visible?