From 0a29cb0bbfd4e7cba629da797c8d47899074c4a4 Mon Sep 17 00:00:00 2001 From: welefen Date: Tue, 16 Sep 2014 11:59:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Model=E7=9A=84=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/Lib/Core/Model.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/Lib/Core/Model.js b/test/Lib/Core/Model.js index 5a43c152..ce09c8e0 100644 --- a/test/Lib/Core/Model.js +++ b/test/Lib/Core/Model.js @@ -245,6 +245,10 @@ describe('Model', function(){ var unique = model.getUniqueField({}); assert.equal(unique, undefined) }) + it('getUniqueField with data', function(){ + var unique = model.getUniqueField({title: 1}); + assert.equal(unique, 'title') + }) }) describe('getLastSql', function(){