[IMP] web: Enhance registry.js tests

Make sure we're really setting and getting registry values instead of
just `undefined` values.
This commit is contained in:
Leonardo Rochael Almeida
2017-03-03 10:17:46 +01:00
committed by Géry Debongnie
parent 6eb15a6263
commit 2b5e879957
+5 -3
View File
@@ -1,8 +1,8 @@
odoo.define_section('web.registry', ['web.Registry'], {
beforeEach: function () {
this.Foo = {};
this.Bar = {};
this.Foo2 = {};
this.Foo = {bar: 1};
this.Bar = {foo: 0};
this.Foo2 = {fred: -1};
},
}, function (test) {
@@ -14,6 +14,8 @@ odoo.define_section('web.registry', ['web.Registry'], {
.add('bar', this.Bar);
assert.strictEqual(registry.get('foo'), this.Foo);
// make sure we're comparing actual objects instead of just undefineds
assert.deepEqual(registry.get('foo'), {bar: 1});
});
test('extension', function (assert, Registry) {