diff options
| author | Leonardo Rochael Almeida <leorochael@gmail.com> | 2016-12-30 10:50:34 -0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-03-03 10:17:46 +0100 |
| commit | 2b5e879957341d8f6fe5bfda886754d04ea737ff (patch) | |
| tree | 6ab4ab76b31d6791bda70c8f6c437364586931dd | |
| parent | 6eb15a6263dea13e91ed4ffa7a0a43742748cc87 (diff) | |
[IMP] web: Enhance registry.js tests
Make sure we're really setting and getting registry values instead of
just `undefined` values.
| -rw-r--r-- | addons/web/static/test/registry.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/addons/web/static/test/registry.js b/addons/web/static/test/registry.js index 132444c332a..58996837ec6 100644 --- a/addons/web/static/test/registry.js +++ b/addons/web/static/test/registry.js @@ -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) { |
