Skip to content

Commit

Permalink
#100 Add test for removing record at java script level
Browse files Browse the repository at this point in the history
  • Loading branch information
akashisama committed Apr 12, 2013
1 parent 5de3abe commit 3b2051a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/test/javascript/portal/cart/DownloadCartStausSpec.js
@@ -0,0 +1,23 @@
/*
* Copyright 2012 IMOS
*
* The AODN/IMOS Portal is distributed under the terms of the GNU General Public License
*
*/

describe("Portal.cart.DownloadCartStatus", function() {

it('removeDownloadCartRecord', function() {


spyOn(Ext.Ajax, 'request').andCallFake(function() {return true});

removeDownloadCartRecord("blarg");

var ajaxParams = Ext.Ajax.request.mostRecentCall.args[0];
expect(ajaxParams.url).toBe('downloadCart/removeRecord');
expect(ajaxParams.params.rec_uuid).toBe('blarg');
expect(ajaxParams.success).toBe(_handleSuccessAndShow)
expect(ajaxParams.failure).toBe(_handleFailureAndShow)
});
});

0 comments on commit 3b2051a

Please sign in to comment.