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/mail/static/tests/thread_window_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/mail/static/tests/thread_window_tests.js')
| -rw-r--r-- | addons/mail/static/tests/thread_window_tests.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/addons/mail/static/tests/thread_window_tests.js b/addons/mail/static/tests/thread_window_tests.js index 724d24f901e..620aae407f6 100644 --- a/addons/mail/static/tests/thread_window_tests.js +++ b/addons/mail/static/tests/thread_window_tests.js @@ -28,30 +28,26 @@ QUnit.module('mail', { }, }; this.services = mailTestUtils.getMailServices(); - - // backup original thread window append to selector - this.MailService = _.find(this.services, function (Service) { - return Service.prototype.name === 'mail_service'; - }); - this.ORIGINAL_THREAD_WINDOW_APPENDTO = this.MailService.prototype.THREAD_WINDOW_APPENDTO; + this.ORIGINAL_THREAD_WINDOW_APPENDTO = this.services.mail_service.prototype.THREAD_WINDOW_APPENDTO; this.createParent = function (params) { var widget = new Widget(); // in non-debug mode, append thread windows in qunit-fixture if (params.debug) { - self.MailService.prototype.THREAD_WINDOW_APPENDTO = 'body'; + self.services.mail_service.prototype.THREAD_WINDOW_APPENDTO = 'body'; } else { - self.MailService.prototype.THREAD_WINDOW_APPENDTO = '#qunit-fixture'; + self.services.mail_service.prototype.THREAD_WINDOW_APPENDTO = '#qunit-fixture'; } + params.services = _.clone(params.services); testUtils.addMockEnvironment(widget, params); return widget; }; }, afterEach: function () { // reset thread window append to body - this.MailService.prototype.THREAD_WINDOW_APPENDTO = 'body'; + this.services.mail_service.prototype.THREAD_WINDOW_APPENDTO = 'body'; }, }, function () { |
