From d764aaa42738daa82fd2e197d02de3226017c7d9 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 6 Jun 2014 09:55:32 +0200 Subject: [PATCH] Fixed Snap mock Also fixed JSHint errors --- core/js/tests/specHelper.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index f7ec7856ba..2af3497051 100644 --- a/core/js/tests/specHelper.js +++ b/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