From ec6d6e7572f3bd8558eb9f9f8a07de9cfad5caca Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Sat, 16 Feb 2013 23:09:20 +0800 Subject: [PATCH] Set User table name and fix test for migrations --- test/migration.coffee | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/migration.coffee b/test/migration.coffee index dad8ce8..c08255b 100644 --- a/test/migration.coffee +++ b/test/migration.coffee @@ -24,6 +24,7 @@ User = schema.define 'User', , indexes: index1: columns: 'email, createdByAdmin' + table: 'user' withBlankDatabase = (cb) -> db = schema.settings.database = DBNAME @@ -119,8 +120,8 @@ it 'should run migration', (test) -> # Once gain, getIdexes truncates multi-key indexes to the first member. Hence index1 is correct. getIndexes 'User', (err, fields) -> test.deepEqual fields, - PRIMARY: - Table: 'User' + PRIMARY: + Table: 'user' Non_unique: 0 Key_name: 'PRIMARY' Seq_in_index: 1 @@ -133,8 +134,8 @@ it 'should run migration', (test) -> Index_type: 'BTREE' Comment: '' Index_comment: '' - email: - Table: 'User' + email: + Table: 'user' Non_unique: 1 Key_name: 'email' Seq_in_index: 1 @@ -147,8 +148,8 @@ it 'should run migration', (test) -> Index_type: 'BTREE' Comment: '' Index_comment: '' - index1: - Table: 'User' + index1: + Table: 'user' Non_unique: 1 Key_name: 'index1' Seq_in_index: 1