Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#100 Add test for removing record at java script level
- Loading branch information
akashisama
committed
Apr 12, 2013
1 parent
5de3abe
commit 3b2051a
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
}); | ||
}); |