1
0
Fork 0

newlog spec

This commit is contained in:
Heiko Kernbach 2014-04-07 22:04:23 +02:00
parent b9924c4fb8
commit 8a6cdde372
2 changed files with 43 additions and 2 deletions

View File

@ -51,7 +51,6 @@
"frontend/js/bootstrap/module-internal.js",
"frontend/js/client/bootstrap/module-internal.js",
"frontend/js/client/client.js",
"test/specs/graphViewer/helper/eventHelper.js",
"test/specs/graphViewer/helper/objectsHelper.js",
"test/specs/graphViewer/helper/mocks.js",
@ -88,7 +87,6 @@
"frontend/js/graphViewer/ui/graphViewerUI.js",
"frontend/js/graphViewer/ui/graphViewerWidget.js",
"frontend/js/graphViewer/ui/graphViewerPreview.js",
"frontend/js/models/arangoCollectionModel.js",
"frontend/js/models/arangoDatabase.js",
"frontend/js/models/arangoDocument.js",
@ -263,6 +261,7 @@
"test/specs/views/documentViewSpec.js",
"test/specs/views/graphManagementViewSpec.js",
"test/specs/views/addNewGraphViewSpec.js",
"test/specs/views/newLogsViewSpec.js",
"test/specs/router/routerSpec.js",
"test/specs/router/clusterRouterSpec.js"
]

View File

@ -0,0 +1,42 @@
/*jslint indent: 2, nomen: true, maxlen: 100, white: true plusplus: true, browser: true*/
/*global describe, beforeEach, afterEach, it, spyOn, expect*/
(function() {
"use strict";
describe("The new logs view", function() {
var view;
beforeEach(function() {
view = new window.NewLogsView();
});
it("set active log level", function () {
var dummyCollection = {
fetch: function() {
}
};
spyOn(this, "activeCollection").andReturn(dummyCollection);
spyOn(dummyCollection, "fetch").andReturn(dummyCollection.fetch());
var element = {
currentTarget: {
id: "loginfo"
}
};
spyOn(view, "convertModelToJSON");
view.setActiveLogLevel(element);
expect(view.convertModelToJSON).toHaveBeenCalled();
});
});
}());