X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/037585db3933a2954b43bd4b30ea5e30ade00be2..3e88348b27bd432bd7cfcc2e01f7b77a01011e68:/test/models/language_test.rb diff --git a/test/models/language_test.rb b/test/models/language_test.rb index cb4c8c631..5ba558907 100644 --- a/test/models/language_test.rb +++ b/test/models/language_test.rb @@ -1,21 +1,13 @@ -# coding: utf-8 require "test_helper" class LanguageTest < ActiveSupport::TestCase - fixtures :languages - - def test_language_count - assert_equal 3, Language.count - end - def test_name - assert_equal "English (English)", languages(:en).name - assert_equal "German (Deutsch)", languages(:de).name - assert_equal "Slovenian (slovenščina)", languages(:sl).name + create(:language, :code => "sl", :english_name => "Slovenian", :native_name => "slovenščina") + assert_equal "Slovenian (slovenščina)", Language.find("sl").name end def test_load - assert_equal 3, Language.count + assert_equal 0, Language.count assert_raise ActiveRecord::RecordNotFound do Language.find("zh") end