File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 6262 }
6363
6464 var promise = new Promise ( function ( resolve , reject ) {
65+ var _params = mergeRecursive ( { } , this . _options . params ) ;
66+
6567 this . _queue . push ( {
6668 method : method ,
67- params : mergeRecursive ( this . _options . params , params || { } ) ,
69+ params : mergeRecursive ( _params , params || { } ) ,
6870 deferred : { resolve : resolve , reject : reject }
6971 } ) ;
7072
Original file line number Diff line number Diff line change @@ -123,6 +123,21 @@ describe('Tagged API', function() {
123123 this . http . post . calledOnce . should . be . true ;
124124 } ) ;
125125
126+ // WTA-537
127+ it ( 'does not bleed parameters' , function ( ) {
128+ this . api . execute ( "im.send" , {
129+ param1 : "foo" ,
130+ param2 : "bar"
131+ } ) ;
132+ this . api . execute ( "im.doStuff" , {
133+ param3 : "bar" ,
134+ param4 : "baz"
135+ } ) ;
136+ this . clock . tick ( 1 ) ;
137+ this . http . post . lastCall . args [ 0 ] . body . should . not . match ( / m e t h o d = i m .s e n d .* p a r a m 3 = b a r / ) ;
138+ this . http . post . lastCall . args [ 0 ] . body . should . not . match ( / m e t h o d = i m .d o S t u f f .* p a r a m 1 = f o o / g) ;
139+ } ) ;
140+
126141 it ( 'makes new post call after clock tick' , function ( ) {
127142 var expectedBody = "\nmethod=im.send¶m1=foo¶m2=bar\n" ;
128143 this . api . execute ( "im.send" , {
You can’t perform that action at this time.
0 commit comments