Skip to content

Commit

Permalink
adjust js unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz committed Sep 10, 2018
1 parent 4893e17 commit 118f2fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/js/tests/specs/sharedialogviewSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/* global oc_appconfig, sinon */
describe('OC.Share.ShareDialogView', function() {
var $container;
var oldConfig;
var oldAppConfig;
var autocompleteStub;
var avatarStub;
Expand All @@ -40,6 +41,9 @@ describe('OC.Share.ShareDialogView', function() {
// horrible parameters
$('#testArea').append('<input id="allowShareWithLink" type="hidden" value="yes">');
$container = $('#shareContainer');
oldConfig = window.oc_config;
window.oc_config = window.oc_config || {};
window.oc_config['sharing.maxAutocompleteResults'] = 0;
/* jshint camelcase:false */
oldAppConfig = _.extend({}, oc_appconfig.core);
oc_appconfig.core.enforcePasswordForPublicLink = false;
Expand Down Expand Up @@ -108,6 +112,7 @@ describe('OC.Share.ShareDialogView', function() {
});
afterEach(function() {
OC.currentUser = oldCurrentUser;
window.oc_config = oldConfig;
/* jshint camelcase:false */
oc_appconfig.core = oldAppConfig;

Expand Down

0 comments on commit 118f2fc

Please sign in to comment.