try to fix Jasmine failure on CI by not overwriting app.views.Location in spec

This commit is contained in:
Jonne Haß 2013-05-16 23:16:15 +02:00
parent 67d7f02faa
commit 848e5d2a57

View file

@ -329,6 +329,9 @@ describe("app.views.Publisher", function() {
// inserts location to the DOM; it is the location's view element
setFixtures('<div id="location"></div>');
//Backup original view
var original_location = app.views.Location;
// creates a new Location view with the #location element
app.views.Location = new Backbone.View({el:"#location"});
@ -337,7 +340,11 @@ describe("app.views.Publisher", function() {
// calls the destroy function and test the expected result
this.view.destroyLocation();
expect($("#location").length).toBe(0);
//Restore view
app.views.Location = original_location;
})
});