summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/fields/relational_fields_tests.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-07-14 16:10:36 +0200
committerGéry Debongnie <ged@odoo.com>2017-07-18 14:45:22 +0200
commitf7dd085e80c463c828396408f37c12700fec36de (patch)
treeaadac665f5af08fab60859cc9841da57a05aede1 /addons/web/static/tests/fields/relational_fields_tests.js
parent5f8dea490acd1812cb7d920ef793cf414014e296 (diff)
[FIX] web: mock name search actually evaluates the domain
Before this commit, the _mockNameSearch method of the mock server was computing by hand the first element of the domain. This was adhoc and wrong (for example, the '==' operator). Also, we actually have a method designed to just return the records matching a given domain.
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
-rw-r--r--addons/web/static/tests/fields/relational_fields_tests.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js
index 026026906c4..fdd8ffdd124 100644
--- a/addons/web/static/tests/fields/relational_fields_tests.js
+++ b/addons/web/static/tests/fields/relational_fields_tests.js
@@ -995,14 +995,16 @@ QUnit.module('relational_fields', {
assert.deepEqual(
args.kwargs.context,
{hey: "ho", hello: "world", test: "yop"},
- 'the field attr context should have been used for the '
- + 'RPC (evaluated and merged with the session one)');
+ 'the field attr context should have been used for the ' +
+ 'RPC (evaluated and merged with the session one)');
+ return $.when([]);
}
if (args.method === 'name_search' && args.model === 'partner') {
assert.deepEqual(args.kwargs.args, [['id', 'in', [12]]],
'the field attr domain should have been used for the RPC (and evaluated)');
assert.deepEqual(args.kwargs.context, {hey: 'ho', timmy: [[6, false, [12]]]},
'the field attr context should have been used for the RPC (and evaluated)');
+ return $.when([]);
}
return this._super.apply(this, arguments);
},