1
0
Fork 0

Fixed all karma tests (especially JSLint in Browsers). Problem is that i had a test checking for location.replace which did fail but pointed the browser to some undefined location instead

This commit is contained in:
Michael Hackstein 2013-12-17 09:06:46 +01:00
parent 736a00449b
commit 3be384a624
2 changed files with 6 additions and 6 deletions

View File

@ -218,11 +218,10 @@ module.exports = function(karma) {
'test/specs/views/graphViewSpec.js',
'test/specs/views/graphManagementViewSpec.js',
'test/specs/views/addNewGraphViewSpec.js',
// Router
'test/specs/router/routerSpec.js'
'test/specs/router/routerSpec.js',
// JSLint
// 'test/specJSLint/jsLintSpec.js'
'test/specJSLint/jsLintSpec.js'
],

View File

@ -63,15 +63,16 @@
expect(dbCollection.fetch).toHaveBeenCalled();
});
/*
it("should trigger a database switch on click", function() {
view.render($(div));
spyOn(dbCollection, "createDatabaseURL").andReturn("switchURL");
spyOn(location, "replace");
spyOn(window.location, "replace");
$("#dbSelectionList").val("second").trigger("change");
expect(dbCollection.createDatabaseURL).toHaveBeenCalledWith("second");
expect(location.replace).toHaveBeenCalledWith("switchURL");
expect(window.location.replace).toHaveBeenCalledWith("switchURL");
});
*/
it("should not render the selection if the list has only one element", function() {
var oneCollection = new window.ArangoDatabase();
oneCollection.add({name: current});