diff options
| author | fwi-odoo <fwi@odoo.com> | 2017-09-07 10:40:39 +0200 |
|---|---|---|
| committer | fwi-odoo <fwi@odoo.com> | 2017-09-07 11:25:30 +0200 |
| commit | ef6074beb637fbb20b56f76838a4bc22226b62cb (patch) | |
| tree | 850ed12ed082fa68fda729069a54f9b2114c6342 /addons/web/static/tests/fields/relational_fields_tests.js | |
| parent | d3617fd852dbe471ca667f8cf3573a9327d6b064 (diff) | |
[FIX] web: fix x2m tests
When a x2m field is modified, the 'save' rpc doesn't send 'False' as second
argument of the special command that manipulate the set of records.
From now on, the virtual id of the record is sent to the server as second
argument. This commit fixes the tests making the assumption that 'False'
was sent.
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 5dc17e6fb59..5451629a3ed 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -5539,7 +5539,7 @@ QUnit.module('relational_fields', { QUnit.test('editing tabbed one2many (editable=bottom)', function (assert) { - assert.expect(11); + assert.expect(12); this.data.partner.records[0].turtles = []; for (var i = 0; i < 42; i++) { @@ -5565,7 +5565,8 @@ QUnit.module('relational_fields', { mockRPC: function (route, args) { assert.step(args.method); if (args.method === 'write') { - assert.deepEqual(args.args[1].turtles[42], [0, false, {turtle_foo: 'rainbow dash'}]); + assert.strictEqual(args.args[1].turtles[42][0], 0); + assert.deepEqual(args.args[1].turtles[42][2], {turtle_foo: 'rainbow dash'}); } return this._super.apply(this, arguments); }, @@ -5591,7 +5592,7 @@ QUnit.module('relational_fields', { }); QUnit.test('editing tabbed one2many (editable=top)', function (assert) { - assert.expect(14); + assert.expect(15); this.data.partner.records[0].turtles = []; this.data.turtle.fields.turtle_foo.default = "default foo"; @@ -5618,7 +5619,8 @@ QUnit.module('relational_fields', { mockRPC: function (route, args) { assert.step(args.method); if (args.method === 'write') { - assert.deepEqual(args.args[1].turtles[0], [0, false, {turtle_foo: 'rainbow dash'}]) + assert.strictEqual(args.args[1].turtles[0][0], 0); + assert.deepEqual(args.args[1].turtles[0][2], {turtle_foo: 'rainbow dash'}); } return this._super.apply(this, arguments); }, |
