Commit adf35b4b authored by Steffen van Bergerem's avatar Steffen van Bergerem

Bump jasmine

parent 35e9faf5
......@@ -308,7 +308,7 @@ group :development, :test do
gem "cucumber-rails", "1.5.0", require: false
# Jasmine (client side application tests (JS))
gem "jasmine", "2.5.2"
gem "jasmine", "2.6.0"
gem "jasmine-jquery-rails", "2.0.3"
gem "rails-assets-jasmine-ajax", "3.3.1", source: "https://rails-assets.org"
gem "sinon-rails", "1.15.0"
......
......@@ -310,12 +310,12 @@ GEM
i18n-inflector (~> 2.6)
railties (>= 3.0.0)
ipaddress (0.8.3)
jasmine (2.5.2)
jasmine-core (>= 2.5.1, < 3.0.0)
jasmine (2.6.0)
jasmine-core (>= 2.6.0, < 3.0.0)
phantomjs
rack (>= 1.2.1)
rake
jasmine-core (2.5.2)
jasmine-core (2.6.4)
jasmine-jquery-rails (2.0.3)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
......@@ -798,7 +798,7 @@ DEPENDENCIES
handlebars_assets (= 0.23.2)
http_accept_language (= 2.1.1)
i18n-inflector-rails (= 1.0.7)
jasmine (= 2.5.2)
jasmine (= 2.6.0)
jasmine-jquery-rails (= 2.0.3)
jquery-rails (= 4.3.1)
js-routes (= 1.3.3)
......
describe("app", function() {
afterAll(function() {
Backbone.history.stop();
app.initialize();
});
describe("initialize", function() {
it("calls several setup functions", function() {
spyOn(app.Router.prototype, "initialize");
......@@ -109,6 +114,10 @@ describe("app", function() {
});
describe("setupBackboneLinks", function() {
beforeEach(function() {
Backbone.history.stop();
});
it("calls Backbone.history.start", function() {
spyOn(Backbone.history, "start");
app.setupBackboneLinks();
......@@ -126,7 +135,6 @@ describe("app", function() {
afterEach(function() {
app.stream = undefined;
Backbone.history.stop();
});
it("calls Backbone.history.navigate", function() {
......
......@@ -5,7 +5,6 @@ describe("app.views.Header", function() {
loginAs(this.userAttrs);
spec.loadFixture("aspects_index");
gon.appConfig = {settings: {podname: "MyPod"}};
app.notificationsCollection = new app.collections.Notifications();
this.view = new app.views.Header().render();
});
......
......@@ -72,6 +72,24 @@ beforeEach(function() {
};
};
/* jshint +W121 */
// add gon defaults
window.gon = {
appConfig: {
chat: {enabled: false},
settings: {podname: "MyPod"},
map: {
mapbox: {
enabled: false,
/* eslint-disable camelcase */
access_token: null,
/* eslint-enable camelcase */
style: "mapbox/streets-v9"
}
}
},
preloads: {}
};
});
afterEach(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment