[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.
This commit is contained in:
Aaron Bohy
2018-08-13 09:09:53 +02:00
parent 43d21dd9ce
commit 04e0f8a7e5
@@ -335,7 +335,7 @@ var MockServer = Class.extend({
activeInDomain = activeInDomain || subdomain[0] === 'active';
});
if (!activeInDomain) {
domain.unshift(['active', '=', true]);
domain = [['active', '=', true]].concat(domain);
}
}