From acf5363fe264dad91e8d84f70eb2577979c7c18d Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Tue, 26 Aug 2014 21:54:48 +0200 Subject: [PATCH] Added test highlighting a missing feature Added a test to show that current implementation of 'cloneRecord' does not process DirectLogins yet. --- .../tests/tests/Clipperz/PM/DataModel/User.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frontend/delta/tests/tests/Clipperz/PM/DataModel/User.test.js b/frontend/delta/tests/tests/Clipperz/PM/DataModel/User.test.js index 73b1da3..6453e89 100644 --- a/frontend/delta/tests/tests/Clipperz/PM/DataModel/User.test.js +++ b/frontend/delta/tests/tests/Clipperz/PM/DataModel/User.test.js @@ -2047,6 +2047,12 @@ console.log("PROXY", proxy); deferredResult.addCallback(MochiKit.Base.keys); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(2, "The selected record has 2 fields"); + + deferredResult.addMethod(user, 'getRecord', recordID); + deferredResult.addMethodcaller('directLogins'); + deferredResult.addCallback(MochiKit.Base.keys); + deferredResult.addCallback(MochiKit.Base.itemgetter('length')); + deferredResult.addTest(1, "The selected record has 1 direct logins"); deferredResult.addMethod(user, 'getRecord', recordID); deferredResult.addMethod(user, 'cloneRecord'); @@ -2069,6 +2075,12 @@ console.log("PROXY", proxy); deferredResult.addCallback(MochiKit.Base.itemgetter('length')); deferredResult.addTest(2, "The cloned record has 2 fields too"); + deferredResult.addCallback(function () { return clonedRecordID; }) + deferredResult.addMethod(user, 'getRecord'); + deferredResult.addMethodcaller('directLogins'); + deferredResult.addCallback(MochiKit.Base.keys); + deferredResult.addCallback(MochiKit.Base.itemgetter('length')); + deferredResult.addTest(1, "The cloned record has 1 direct logins"); deferredResult.callback();