From 0dc4b133fb0795b9c55f8a9fc95b55bc4df7ebf2 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 11 Apr 2013 16:42:11 +0200 Subject: Builder: return object when it's already built https://fedorahosted.org/freeipa/ticket/3235 --- install/ui/test/build_tests.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'install/ui/test') diff --git a/install/ui/test/build_tests.js b/install/ui/test/build_tests.js index fec8717b..603f41fa 100644 --- a/install/ui/test/build_tests.js +++ b/install/ui/test/build_tests.js @@ -59,6 +59,7 @@ test('Testing builder', function() { var o2 = b2.build({}); var o21 = b2.build({ foo: 'baz'}); + var o22 = b2.build(o21); var r1 = { foo: 'bar' }; var r11 = { foo: 'baz' }; @@ -71,6 +72,8 @@ test('Testing builder', function() { deepEqual(o2, r2, 'Constructor, default'); deepEqual(o21, r21, 'Constructor, spec use'); + strictEqual(o21, o22, 'Don\'t build built object'); + }); test('Testing Spec_mod', function() { -- cgit