From 01fcc7503a08ec7160e42acf34edb86b12bc420b Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 13 Mar 2015 17:45:55 +1100 Subject: [PATCH] big hacks to get tests to pass --- test/javascripts/helpers/create-pretender.js.es6 | 9 +++++++++ test/javascripts/test_helper.js | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/test/javascripts/helpers/create-pretender.js.es6 b/test/javascripts/helpers/create-pretender.js.es6 index c64d4c1b6..8eb11ad13 100644 --- a/test/javascripts/helpers/create-pretender.js.es6 +++ b/test/javascripts/helpers/create-pretender.js.es6 @@ -55,6 +55,15 @@ export default function() { return response({}); }); + this.get('/javascripts/jquery.magnific-popup-min.js', function() { + return response({}); + }); + + + this.get('/highlight.js', function() { + return response({}); + }); + this.post('/session', function(request) { var data = parsePostData(request.requestBody); diff --git a/test/javascripts/test_helper.js b/test/javascripts/test_helper.js index 94b842a54..5935a8155 100644 --- a/test/javascripts/test_helper.js +++ b/test/javascripts/test_helper.js @@ -47,6 +47,8 @@ //= require_tree ./lib //= require_tree . //= require_self +// +//= require ../../public/javascripts/jquery.magnific-popup-min.js // sinon settings sinon.config = { @@ -73,6 +75,9 @@ Discourse.injectTestHelpers(); Discourse.runInitializers(); Discourse.start(); Discourse.Route.mapRoutes(); +Discourse.HighlightJSPath = "/highlight.js"; +// messy but we need to pass tests +window.hljs = {highlightBlock: function(){}} // disable logster error reporting if (window.Logster) {