From 04e0f8a7e5516063ef5ba8c3bf240e9607bd08c5 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Thu, 9 Aug 2018 12:07:52 +0200 Subject: [PATCH] [FIX] web: MockServer: don't alter domain in place In a test, we might want to check the domains given to RPCs with assert.step/verifySteps. Before this rev., if there were an 'active' field on the model, ['active', '=', true] was automatically added to the domain by the MockServer in place, thus altering the expected domain in the test. --- addons/web/static/tests/helpers/mock_server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/tests/helpers/mock_server.js b/addons/web/static/tests/helpers/mock_server.js index 891201b7d79..6839223a903 100644 --- a/addons/web/static/tests/helpers/mock_server.js +++ b/addons/web/static/tests/helpers/mock_server.js @@ -335,7 +335,7 @@ var MockServer = Class.extend({ activeInDomain = activeInDomain || subdomain[0] === 'active'; }); if (!activeInDomain) { - domain.unshift(['active', '=', true]); + domain = [['active', '=', true]].concat(domain); } }