summaryrefslogtreecommitdiffstats
path: root/core/js/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-13 11:33:12 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-01-13 11:33:12 +0100
commitda28a1612ec83e3ced1e1b4d8fad9326d6a539b0 (patch)
tree6b6bd152579fe64044ef6f2d1b14729faeba6db0 /core/js/tests
parent9d56d5e94d29802a986faad398bb386a0d038b4f (diff)
downloadnextcloud-server-da28a1612ec83e3ced1e1b4d8fad9326d6a539b0.tar.gz
nextcloud-server-da28a1612ec83e3ced1e1b4d8fad9326d6a539b0.zip
expect warning to be shown
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'core/js/tests')
-rw-r--r--core/js/tests/specs/coreSpec.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js
index 370ebc6ba2d..d83c0cd9a38 100644
--- a/core/js/tests/specs/coreSpec.js
+++ b/core/js/tests/specs/coreSpec.js
@@ -967,8 +967,9 @@ describe('Core base tests', function() {
fadeOutStub.restore();
});
it('hides the first notification when calling hide without arguments', function() {
- var $row1 = OC.Notification.show('One');
+ OC.Notification.show('One');
var $row2 = OC.Notification.show('Two');
+ spyOn(console, 'warn');
var $el = $('#notification');
var $rows = $el.find('.row');
@@ -976,6 +977,7 @@ describe('Core base tests', function() {
OC.Notification.hide();
+ expect(console.warn).toHaveBeenCalled();
$rows = $el.find('.row');
expect($rows.length).toEqual(1);
expect($rows.eq(0).is($row2)).toEqual(true);