[FIX] re-enable web_tests_demo tests

bzr revid: xmo@openerp.com-20140131152753-81418oy8wjzxkgmt
This commit is contained in:
Xavier Morel 2014-01-31 16:27:53 +01:00
parent ae3223907b
commit 8be916910e
1 changed files with 16 additions and 18 deletions

View File

@ -1,7 +1,5 @@
// niv: I desactivate these until the testing framework has been adapted to better use
// the new way to declare JavaScript modules
/*openerp.testing.section('basic section', function (test) {
openerp.testing.section('basic section', function (test) {
test('my first test', function () {
ok(true, "this test has run");
});
@ -88,18 +86,18 @@
});
});
// test('actual RPC', {rpc: 'rpc', asserts: 4}, function (instance) {
// var Model = new instance.web.Model('web_tests_demo.model');
// return Model.call('create', [{name: "Bob"}])
// .then(function (id) {
// return Model.call('read', [[id]]);
// }).then(function (records) {
// strictEqual(records.length, 1);
// var record = records[0];
// strictEqual(record.name, "Bob");
// strictEqual(record.thing, false);
// // default value
// strictEqual(record.other, 'bob');
// });
// });
});*/
test('actual RPC', {rpc: 'rpc', asserts: 4}, function (instance) {
var Model = new instance.web.Model('web_tests_demo.model');
return Model.call('create', [{name: "Bob"}])
.then(function (id) {
return Model.call('read', [[id]]);
}).then(function (records) {
strictEqual(records.length, 1);
var record = records[0];
strictEqual(record.name, "Bob");
strictEqual(record.thing, false);
// default value
strictEqual(record.other, 'bob');
});
});
});