Fixed Snap mock

Also fixed JSHint errors
remotes/origin/ldap_group_count
Vincent Petry 12 years ago
parent b8ab77a475
commit d764aaa427
  1. 15
      core/js/tests/specHelper.js

@ -19,15 +19,12 @@
*
*/
/* global OC */
/**
* Simulate the variables that are normally set by PHP code
*/
// from core/js/config.php
window.TESTING = true;
window.oc_debug = true;
window.datepickerFormatDate = 'MM d, yy';
window.dayNames = [
'Sunday',
@ -55,6 +52,8 @@ window.monthNames = [
window.firstDay = 0;
// setup dummy webroots
/* jshint camelcase: false */
window.oc_debug = true;
window.oc_webroot = location.href + '/';
window.oc_appswebroots = {
"files": window.oc_webroot + '/apps/files/'
@ -68,14 +67,20 @@ window.oc_appconfig = {
};
window.oc_defaults = {};
/* jshint camelcase: true */
// mock for Snap.js plugin
window.Snap = function() {};
window.Snap.prototype = {
enable: function() {},
disable: function() {},
close: function() {}
};
// global setup for all tests
(function setupTests() {
var fakeServer = null,
$testArea = null,
routesRequestStub;
$testArea = null;
beforeEach(function() {
// test area for elements that need absolute selector access or measure widths/heights

Loading…
Cancel
Save