diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-08-02 13:36:30 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-08-09 02:31:59 +0200 |
| commit | a8e4e625f4075892cd5b86b3dbc61b70ace3470d (patch) | |
| tree | 91e065ca47d5c88f6448162cf27ac3c6c70cfba8 /addons/web/static/tests/views/form_tests.js | |
| parent | cf4c4a11b734d65235e22b27550a499611581fff (diff) | |
[IMP] web: remove useless service name
We use the registry keys as name for the services.
Diffstat (limited to 'addons/web/static/tests/views/form_tests.js')
| -rw-r--r-- | addons/web/static/tests/views/form_tests.js | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/addons/web/static/tests/views/form_tests.js b/addons/web/static/tests/views/form_tests.js index 9d4f6a0e9ad..219972f46c9 100644 --- a/addons/web/static/tests/views/form_tests.js +++ b/addons/web/static/tests/views/form_tests.js @@ -2850,17 +2850,19 @@ QUnit.module('Views', { arch: '<form string="Partners">' + '<group><field name="foo"/></group>' + '</form>', - services: [NotificationService.extend({ - notify: function (params) { - if (params.type !== 'warning') { - return; + services: { + notification: NotificationService.extend({ + notify: function (params) { + if (params.type !== 'warning') { + return; + } + assert.strictEqual(params.title, 'The following fields are invalid:', + "should have a warning with correct title"); + assert.strictEqual(params.message, '<ul><li>Foo</li></ul>', + "should have a warning with correct message"); } - assert.strictEqual(params.title, 'The following fields are invalid:', - "should have a warning with correct title"); - assert.strictEqual(params.message, '<ul><li>Foo</li></ul>', - "should have a warning with correct message"); - } - })], + }), + }, }); form.$buttons.find('.o_form_button_save').click(); @@ -4934,11 +4936,13 @@ QUnit.module('Views', { } return result; }, - services: [NotificationService.extend({ - notify: function (params) { - assert.step(params.type); - } - })], + services: { + notification: NotificationService.extend({ + notify: function (params) { + assert.step(params.type); + } + }), + }, }); form.$buttons.find('.o_form_button_edit').click(); |
