diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-08-06 20:58:27 +0900 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-08-06 20:58:27 +0900 |
commit | 904bfad00d27ddfb33434550ea9201d85a8742ab (patch) | |
tree | fb5258308a37fd9e61da7c0809bed641ad34d66b | |
parent | fd4e178c7ea571b3885e1247f438eead070a656e (diff) | |
download | rails-904bfad00d27ddfb33434550ea9201d85a8742ab.tar.gz rails-904bfad00d27ddfb33434550ea9201d85a8742ab.tar.bz2 rails-904bfad00d27ddfb33434550ea9201d85a8742ab.zip |
adding a weird test case
-rw-r--r-- | activerecord/test/cases/base_test.rb | 7 | ||||
-rw-r--r-- | activerecord/test/schema/schema.rb | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 3a1830a739..c91cf89f6d 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1,3 +1,5 @@ +# encoding: utf-8 + require "cases/helper" require 'active_support/concurrency/latch' require 'models/post' @@ -582,6 +584,11 @@ class BasicsTest < ActiveRecord::TestCase assert_equal "changed", post.body end + def test_unicode_column_name + weird = Weird.create(:なまえ => 'たこ焼き仮面') + assert_equal 'たこ焼き仮面', weird.なまえ + end + def test_non_valid_identifier_column_name weird = Weird.create('a$b' => 'value') weird.reload diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 188a3f0164..c3fc61a6da 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -781,6 +781,7 @@ ActiveRecord::Schema.define do end create_table :weirds, :force => true do |t| t.string 'a$b' + t.string 'なまえ' t.string 'from' end |