From ea26d20acf2e35d3a450d548c03bcc651ef6a64a Mon Sep 17 00:00:00 2001 From: vvakame Date: Tue, 23 Feb 2016 11:58:40 +0900 Subject: [PATCH] Revert "fix restful.js/restful.js-tests.ts" This reverts commit 1e1e5ec5fa906c1b22648c228a116d855e00a154. --- restful.js/restful.js-tests.ts | 52 ++++++++++++++++------------------ 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/restful.js/restful.js-tests.ts b/restful.js/restful.js-tests.ts index f2a5bff8bb..80f3bd1874 100644 --- a/restful.js/restful.js-tests.ts +++ b/restful.js/restful.js-tests.ts @@ -144,37 +144,33 @@ resource.addRequestInterceptor((data: any, headers: any, method: string, url: st resource.addFullRequestInterceptor(function(params, headers, data, method, url) { //... - if(Math.random() < 0.5) { - // all args had been modified - return { - params: params, - headers: headers, - data: data, - method: method, - url: url - }; - } else { - // just return modified arguments - return { - headers: headers, - data: data - }; - } + // all args had been modified + return { + params: params, + headers: headers, + data: data, + method: method, + url: url + }; + + // just return modified arguments + return { + headers: headers, + data: data + }; }); resource.addFullResponseInterceptor(function(data, headers, method, url) { - if(Math.random() < 0.5) { - // all args had been modified (method and url is read only) - return { - headers: headers, - data: data - }; - } else { - // just return modified arguments - return { - headers: headers - }; - } + // all args had been modified (method and url is read only) + return { + headers: headers, + data: data + }; + + // just return modified arguments + return { + headers: headers + }; }); //