Skip to content
Snippets Groups Projects
Commit 75789c23 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

unit tes fixed

parent 14f0ec9e
No related branches found
No related tags found
2 merge requests!630WIP: Resolve "The privileges of a new user are not saved in some cases",!589Feature error reporting
...@@ -44,14 +44,14 @@ describe('GuiConnector', function () { ...@@ -44,14 +44,14 @@ describe('GuiConnector', function () {
it('SecurityError when logged in', function () { it('SecurityError when logged in', function () {
var connector = new (GuiConnector.constructor)(); var connector = new (GuiConnector.constructor)();
ServerConnector.getSessionData().setLogin("testUser"); ServerConnector.getSessionData().setLogin("testUser");
var message = connector.getErrorMessageForError(new SecurityError()); var message = connector.getErrorMessageForError(new SecurityError()).message;
assert.ok(message.indexOf("ask your administrator") >= 0); assert.ok(message.indexOf("ask your administrator") >= 0);
connector.destroy(); connector.destroy();
}); });
it('SecurityError when not logged in', function () { it('SecurityError when not logged in', function () {
var connector = new (GuiConnector.constructor)(); var connector = new (GuiConnector.constructor)();
ServerConnector.getSessionData().setLogin("anonymous"); ServerConnector.getSessionData().setLogin("anonymous");
var message = connector.getErrorMessageForError(new SecurityError()); var message = connector.getErrorMessageForError(new SecurityError()).message;
assert.ok(message.indexOf("to access this resource") >= 0); assert.ok(message.indexOf("to access this resource") >= 0);
connector.destroy(); connector.destroy();
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment