diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-11-16 11:14:17 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-11-16 11:14:17 +0100 |
| commit | 796e80ec2dafbd05e35dd7baf00f215393e9260c (patch) | |
| tree | f10aa7383913dadb0da3c393faa3d627cdccf946 /addons/web/static/test/testing.js | |
| parent | 0d85c24ae32916064e74680ef3439dd1bdec3440 (diff) | |
[FIX] deferred.pipe -> deferred.then
bzr revid: xmo@openerp.com-20121116101417-mkcjrdtocl6w7408
Diffstat (limited to 'addons/web/static/test/testing.js')
| -rw-r--r-- | addons/web/static/test/testing.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/test/testing.js b/addons/web/static/test/testing.js index 919143ab533..72c2c3562d7 100644 --- a/addons/web/static/test/testing.js +++ b/addons/web/static/test/testing.js @@ -28,7 +28,7 @@ openerp.testing.section('testing.stack', function (test) { var s = openerp.testing.Stack(); return s.execute(function () { throw new Error("foo"); - }).pipe(reject, function (f) { + }).then(reject, function (f) { strictEqual(f.message, "foo", "should reject with exception"); return $.when(); }); @@ -39,7 +39,7 @@ openerp.testing.section('testing.stack', function (test) { return $.Deferred(function (d) { d.reject("failed"); }); - }).pipe(reject, function (f) { + }).then(reject, function (f) { strictEqual(f, "failed", "should propagate failure"); return $.when(); }); @@ -194,7 +194,7 @@ openerp.testing.section('testing.stack', function (test) { }).execute(function () { code = true; return 42; - }).pipe(reject, function (m) { + }).then(reject, function (m) { ok(setup, "should have executed first setup function"); ok(teardown, "should have executed first teardown function"); ok(!teardown2, "should not have executed second teardown function"); @@ -215,7 +215,7 @@ openerp.testing.section('testing.stack', function (test) { return $.Deferred().reject('Fail 3'); }).execute(function () { return 42; - }).pipe(reject, function (m) { + }).then(reject, function (m) { strictEqual(teardowns, 3, "should have tried executing all teardowns"); strictEqual(m, "Fail 3", "should return first failure message"); @@ -231,7 +231,7 @@ openerp.testing.section('testing.stack', function (test) { return $.Deferred().reject('Fail 2'); }).execute(function () { return $.Deferred().reject("code"); - }).pipe(reject, function (m) { + }).then(reject, function (m) { strictEqual(teardowns, 2, "should have tried executing all teardowns"); strictEqual(m, "code", "should return first failure message"); |
