diff options
| author | Fabien Meghazi <fme@openerp.com> | 2014-04-28 20:24:51 +0200 |
|---|---|---|
| committer | Fabien Meghazi <fme@openerp.com> | 2014-04-28 20:24:51 +0200 |
| commit | dde0c9324bda2aff24a832ace320f23379d1ad07 (patch) | |
| tree | f201f625886fa5216d53a447effc78a69c253e61 /addons/web/static/src/js/testing.js | |
| parent | d60af567ad24bc4b83d916ec1834bbcd294c63e9 (diff) | |
[IMP] Convered qunit test suite to template
bzr revid: fme@openerp.com-20140428182451-u4mgen9669gnldva
Diffstat (limited to 'addons/web/static/src/js/testing.js')
| -rw-r--r-- | addons/web/static/src/js/testing.js | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js index 1f1c718ad5f..5e9483addc1 100644 --- a/addons/web/static/src/js/testing.js +++ b/addons/web/static/src/js/testing.js @@ -48,15 +48,6 @@ openerp.testing = {}; testing.dependencies = window['oe_all_dependencies'] || []; testing.current_module = null; - testing.templates = { }; - testing.add_template = function (name) { - var xhr = QWeb2.Engine.prototype.get_xhr(); - xhr.open('GET', name, false); - xhr.send(null); - (testing.templates[testing.current_module] = - testing.templates[testing.current_module] || []) - .push(xhr.responseXML); - }; /** * Function which does not do anything */ @@ -206,7 +197,7 @@ openerp.testing = {}; teardown: testing.noop }); - QUnit.module(testing.current_module + '.' + name, {_oe: options}); + QUnit.module(name, {_oe: options}); body(testing['case']); }; testing['case'] = function (name, options, callback) { @@ -244,18 +235,6 @@ openerp.testing = {}; expect(opts.asserts); } - if (opts.templates) { - for(var i=0; i<module_deps.length; ++i) { - var dep = module_deps[i]; - var templates = testing.templates[dep]; - if (_.isEmpty(templates)) { continue; } - - for (var j=0; j < templates.length; ++j) { - instance.web.qweb.add_template(templates[j]); - } - } - } - var $fixture = $('#qunit-fixture'); var mock, async = false; |
