First stage of i18n. Some migrations and extra plugins.
This commit is contained in:
parent
6ac7f91734
commit
53b4d645d8
82 changed files with 6876 additions and 18 deletions
11
test/fixtures/languages.yml
vendored
Normal file
11
test/fixtures/languages.yml
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
||||
|
||||
en:
|
||||
language_code: en
|
||||
name: English
|
||||
translation_available: true
|
||||
|
||||
de:
|
||||
language_code: de
|
||||
name: Deutsch
|
||||
translation_available: false
|
|
@ -2,7 +2,7 @@ require File.dirname(__FILE__) + '/../test_helper'
|
|||
|
||||
class DiaryEntryTest < Test::Unit::TestCase
|
||||
api_fixtures
|
||||
fixtures :diary_entries
|
||||
fixtures :diary_entries, :languages
|
||||
|
||||
def test_diary_entry_count
|
||||
assert_equal 2, DiaryEntry.count
|
||||
|
@ -27,7 +27,7 @@ class DiaryEntryTest < Test::Unit::TestCase
|
|||
def diary_entry_valid(attrs, result = true)
|
||||
entry = diary_entries(:normal_user_entry_1).clone
|
||||
entry.attributes = attrs
|
||||
assert_equal result, entry.valid?
|
||||
assert_equal result, entry.valid?, "Expected #{attrs.inspect} to be #{result}"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
8
test/unit/language_test.rb
Normal file
8
test/unit/language_test.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
require 'test_helper'
|
||||
|
||||
class LanguageTest < ActiveSupport::TestCase
|
||||
# Replace this with your real tests.
|
||||
test "the truth" do
|
||||
assert true
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue