[Groonga-commit] ranguba/rroonga at ce622f7 [master] test: add a test for column rename

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Oct 21 23:10:57 JST 2014


Kouhei Sutou	2014-10-21 23:10:57 +0900 (Tue, 21 Oct 2014)

  New Revision: ce622f795bbbe497b9009955d25bbe893b09dacc
  https://github.com/ranguba/rroonga/commit/ce622f795bbbe497b9009955d25bbe893b09dacc

  Message:
    test: add a test for column rename

  Modified files:
    test/test-column.rb

  Modified: test/test-column.rb (+19 -0)
===================================================================
--- test/test-column.rb    2014-10-21 23:10:39 +0900 (3b59a3a)
+++ test/test-column.rb    2014-10-21 23:10:57 +0900 (fdc2ac2)
@@ -461,4 +461,23 @@ class ColumnTest < Test::Unit::TestCase
                    @users_age_column.disk_usage)
     end
   end
+
+  class RenameTest < self
+    def setup
+      setup_database
+
+      Groonga::Schema.define do |schema|
+        schema.create_table("Users") do |table|
+          table.short_text("name")
+        end
+      end
+
+      @users = context["Users"]
+    end
+
+    def test_old_name_reference
+      @users.column("name").rename("nick")
+      assert_nil(@users.column("name"))
+    end
+  end
 end
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index