summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-04-12 01:56:59 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-04-12 01:56:59 +0200
commit10109c9ebefcbfd821b850527f5f4c2327a4d219 (patch)
treebf7b26f73864cf0b8101448bcf1260bd2af41604
parent3f6715ac1d45c89f6a18495d1eb4fdcd3614ffca (diff)
fix js tests to run without appframework
-rw-r--r--js/config/karma.js3
-rw-r--r--js/tests/stubs/owncloud.js36
2 files changed, 37 insertions, 2 deletions
diff --git a/js/config/karma.js b/js/config/karma.js
index 497c426d7..4fe0db5e2 100644
--- a/js/config/karma.js
+++ b/js/config/karma.js
@@ -37,8 +37,7 @@ module.exports = function(config) {
'vendor/angular-mocks/angular-mocks.js',
'vendor/angular-ui/build/angular-ui.js',
'vendor/momentjs/moment.js',
- '../../appframework/js/tests/stubs/owncloud.js',
- '../../appframework/js/public/app.js',
+ 'tests/stubs/owncloud.js',
'tests/stubs/modules.js',
'build/app/directives/*.js',
'build/app/services/**/*.js',
diff --git a/js/tests/stubs/owncloud.js b/js/tests/stubs/owncloud.js
new file mode 100644
index 000000000..2e0a8e1e6
--- /dev/null
+++ b/js/tests/stubs/owncloud.js
@@ -0,0 +1,36 @@
+/**
+ * ownCloud - News
+ *
+ * @author Bernhard Posselt
+ * @copyright 2012 Bernhard Posselt dev@bernhard-posselt.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+/**
+ * Contains mock objects for need OC objects
+ */
+
+var oc_requesttoken = "token";
+
+var OC = {
+ Router:function(){
+ return null;
+ },
+ Notification:function(){
+ return null;
+ }
+}; \ No newline at end of file