Skip to content

Commit

Permalink
try to fix Jasmine failure on CI by not overwriting app.views.Locatio…
Browse files Browse the repository at this point in the history
…n in spec
  • Loading branch information
jhass committed May 16, 2013
1 parent 67d7f02 commit 848e5d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/javascripts/app/views/publisher_view_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"});

Expand All @@ -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;
})
});

Expand Down

0 comments on commit 848e5d2

Please sign in to comment.