Skip to content

Commit

Permalink
[Echo.Canvas] one more test case added for updateLayout metho
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandr Evseev committed Oct 6, 2014
1 parent b49b316 commit d8ddc80
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/unit/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,20 @@ Echo.Tests.asyncTest("updateLayout method", function() {
QUnit.equal(SampleApp.apps["third"].initialized, 1, "third app hasn't been re-initialized.");
callback();
});
},
function(callback) {
// app list is empty, all the apps should be destroyed
canvas.updateLayout([], layout).then(function() {
QUnit.equal(SampleApp.apps["first"].destroyed, 1, "first app has been destroyed");
QUnit.equal(SampleApp.apps["first"].initialized, 1, "first app hasn't been re-initialized.");

QUnit.equal(SampleApp.apps["second"].destroyed, 2, "second app has been destroyed");
QUnit.equal(SampleApp.apps["second"].initialized, 2, "second app hasn't been re-initialized.");

QUnit.equal(SampleApp.apps["third"].initialized, 1, "third app hasn't been re-initialized.");
callback();

});
}
], function() {
QUnit.start();
Expand Down

0 comments on commit d8ddc80

Please sign in to comment.