expect warning to be shown
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
9d56d5e94d
commit
da28a1612e
1 changed files with 3 additions and 1 deletions
|
@ -967,8 +967,9 @@ describe('Core base tests', function() {
|
||||||
fadeOutStub.restore();
|
fadeOutStub.restore();
|
||||||
});
|
});
|
||||||
it('hides the first notification when calling hide without arguments', function() {
|
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');
|
var $row2 = OC.Notification.show('Two');
|
||||||
|
spyOn(console, 'warn');
|
||||||
|
|
||||||
var $el = $('#notification');
|
var $el = $('#notification');
|
||||||
var $rows = $el.find('.row');
|
var $rows = $el.find('.row');
|
||||||
|
@ -976,6 +977,7 @@ describe('Core base tests', function() {
|
||||||
|
|
||||||
OC.Notification.hide();
|
OC.Notification.hide();
|
||||||
|
|
||||||
|
expect(console.warn).toHaveBeenCalled();
|
||||||
$rows = $el.find('.row');
|
$rows = $el.find('.row');
|
||||||
expect($rows.length).toEqual(1);
|
expect($rows.length).toEqual(1);
|
||||||
expect($rows.eq(0).is($row2)).toEqual(true);
|
expect($rows.eq(0).is($row2)).toEqual(true);
|
||||||
|
|
Loading…
Reference in a new issue