summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/py.js/test/test.js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-04-19 10:12:13 +0200
committerXavier Morel <xmo@openerp.com>2012-04-19 10:12:13 +0200
commite7ab44929ff4aa3add8d00bab97fc3e879b9b91c (patch)
treea600579e5c3c00c473550db8da591b6634fcbe0f /addons/web/static/lib/py.js/test/test.js
parent45c48d684270f9a88af668f99a1d027df57f68d3 (diff)
parentf5c37eabe94a04ca62d08f46c1cf3a084fa77f19 (diff)
[MERGE] from trunk
bzr revid: xmo@openerp.com-20120419081213-m3fhofkgydj6gp1m
Diffstat (limited to 'addons/web/static/lib/py.js/test/test.js')
-rw-r--r--addons/web/static/lib/py.js/test/test.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/addons/web/static/lib/py.js/test/test.js b/addons/web/static/lib/py.js/test/test.js
index 31fccc23240..c1f92c44d81 100644
--- a/addons/web/static/lib/py.js/test/test.js
+++ b/addons/web/static/lib/py.js/test/test.js
@@ -376,4 +376,13 @@ describe('numerical protocols', function () {
});
});
});
-}); \ No newline at end of file
+});
+describe('Type converter', function () {
+ it('should convert bare objects to objects', function () {
+ expect(py.eval('foo.bar', {foo: {bar: 3}})).to.be(3);
+ });
+ it('should convert arrays to lists', function () {
+ expect(py.eval('foo[3]', {foo: [9, 8, 7, 6, 5]}))
+ .to.be(6);
+ });
+});