]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/language_test.rb
Merge remote-tracking branch 'upstream/pull/4626'
[rails.git] / test / models / language_test.rb
index 9b2ef72c19125914afe87d0ea8f618df70a4ec5b..f777d8e1965a53d7348e52bfda21cbb9f349b931 100644 (file)
@@ -1,4 +1,3 @@
-# coding: utf-8
 require "test_helper"
 
 class LanguageTest < ActiveSupport::TestCase
@@ -7,6 +6,11 @@ class LanguageTest < ActiveSupport::TestCase
     assert_equal "Slovenian (slovenščina)", Language.find("sl").name
   end
 
+  def test_same_native_name
+    create(:language, :code => "af", :english_name => "Afrikaans", :native_name => "Afrikaans")
+    assert_equal "Afrikaans", Language.find("af").name
+  end
+
   def test_load
     assert_equal 0, Language.count
     assert_raise ActiveRecord::RecordNotFound do