summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-06 09:55:32 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-06 09:55:32 +0200
commitd764aaa42738daa82fd2e197d02de3226017c7d9 (patch)
treed774be6d3b8e9b0d25cb62aba88bd6edd331e4c2 /core/js
parentb8ab77a475c4e0af6761396ad346b72e72a0aa6e (diff)
downloadnextcloud-server-d764aaa42738daa82fd2e197d02de3226017c7d9.tar.gz
nextcloud-server-d764aaa42738daa82fd2e197d02de3226017c7d9.zip
Fixed Snap mock
Also fixed JSHint errors
Diffstat (limited to 'core/js')
-rw-r--r--core/js/tests/specHelper.js15
1 files changed, 10 insertions, 5 deletions
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index f7ec7856ba7..2af3497051c 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