diff options
author | m3ntalsp00n <m3ntalsp00n@gmail.com> | 2017-02-04 18:51:52 +1000 |
---|---|---|
committer | m3ntalsp00n <m3ntalsp00n@gmail.com> | 2017-02-04 18:51:52 +1000 |
commit | dd9ee2db6f981d0a1f1623af831b3eb2239a5990 (patch) | |
tree | 2e2651ad935b3d1ff2d1a0ed632e923500062b16 /core | |
parent | fd40613d8ebae128ef72576ff6243fe2da37b06a (diff) | |
download | nextcloud-server-dd9ee2db6f981d0a1f1623af831b3eb2239a5990.tar.gz nextcloud-server-dd9ee2db6f981d0a1f1623af831b3eb2239a5990.zip |
fix tests, longer wait time, update notification stub
Signed-off-by: m3ntalsp00n <m3ntalsp00n@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/js/tests/specs/coreSpec.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/js/tests/specs/coreSpec.js b/core/js/tests/specs/coreSpec.js index d83c0cd9a38..3380b6be420 100644 --- a/core/js/tests/specs/coreSpec.js +++ b/core/js/tests/specs/coreSpec.js @@ -1000,7 +1000,7 @@ describe('Core base tests', function() { describe('global ajax errors', function() { var reloadStub, ajaxErrorStub, clock; var notificationStub; - var waitTimeMs = 6000; + var waitTimeMs = 6500; var oldCurrentUser; beforeEach(function() { @@ -1075,10 +1075,12 @@ describe('Core base tests', function() { it('displays notification', function() { var xhr = { status: 401 }; + notificationUpdateStub = sinon.stub(OC.Notification, 'showUpdate'); + $(document).trigger(new $.Event('ajaxError'), xhr); clock.tick(waitTimeMs); - expect(notificationStub.calledOnce).toEqual(true); + expect(notificationUpdateStub.notCalled).toEqual(false); }); it('shows a temporary notification if the connection is lost', function() { var xhr = { status: 0 }; |