Add list view async action test

This commit is contained in:
bfederle 2012-03-09 11:27:34 -08:00
parent 35765419d1
commit 9f6230490e
1 changed files with 15 additions and 2 deletions

View File

@ -2,6 +2,7 @@
module('List view', {
setup: function() {
$.fx.off = true;
cloudStack.debug = true;
},
teardown: function() {
// Cleanup notification box
@ -339,7 +340,7 @@
var $cloudStack = $('<div>').appendTo('#qunit-fixture');
var listView = {
listView: {
section: 'test123',
id: 'job123',
fields: {
fieldA: { label: 'testFieldA' },
fieldB: { label: 'testFieldB' }
@ -356,7 +357,19 @@
}
},
action: function(args) {
args.response.success();
args.response.success({
_custom: {
jobId: 'job123'
}
});
},
notification: {
interval: 0,
poll: function(args) {
start();
equal(args._custom.jobId, 'job123', 'Job ID passed correctly');
args.complete();
}
}
}
},