mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 14:26:51 +00:00
Fixed failing tests in MainControllerSpec & UserSettingSpec
This commit is contained in:
parent
6e3e773774
commit
bc187a6f50
@ -13,14 +13,15 @@ describe("MainController", function() {
|
||||
|
||||
this.translate = jasmine.createSpyObj("translate", ["uses"]);
|
||||
this.rootScope = jasmine.createSpy();
|
||||
this.localStorageService = jasmine.createSpyObj("localStorageService", ["get"]);
|
||||
this.localStorageService = jasmine.createSpyObj("localStorageService", ["get", "add"]);
|
||||
|
||||
this.controller = new mifosX.controllers.MainController(this.scope,
|
||||
this.location,
|
||||
this.sessionManager,
|
||||
this.translate,
|
||||
this.rootScope,
|
||||
this.localStorageService, this.keyboardManager);
|
||||
this.localStorageService,
|
||||
this.keyboardManager);
|
||||
});
|
||||
|
||||
describe("on initialisation", function() {
|
||||
@ -32,6 +33,11 @@ describe("MainController", function() {
|
||||
sessionCallback("test_session");
|
||||
expect(this.scope.currentSession).toEqual("test_session");
|
||||
});
|
||||
|
||||
it("should set the dateformat in the scope" , function() {
|
||||
expect(this.scope.dateformat).toEqual("dd MMMM yyyy");
|
||||
expect(this.scope.df).toEqual("dd MMMM yyyy");
|
||||
});
|
||||
});
|
||||
|
||||
describe("on receving 'UserAuthenticationSuccessEvent'", function() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
describe("UserSettingController", function() {
|
||||
|
||||
beforeEach(function() {
|
||||
this.scope = {};
|
||||
this.scope = jasmine.createSpyObj("$scope", ['$watch']);
|
||||
this.translate = {
|
||||
uses: jasmine.createSpy("translate.uses()")
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user