mirror of
https://github.com/openMF/community-app.git
synced 2026-02-06 13:17:04 +00:00
24 lines
726 B
JavaScript
24 lines
726 B
JavaScript
describe("UserSettingController", function() {
|
|
var resourceCallback;
|
|
beforeEach(function() {
|
|
this.scope = {};
|
|
|
|
this.translate = jasmine.createSpyObj("translate", ["uses"]);
|
|
|
|
this.controller = new mifosX.controllers.UserSettingController(this.scope, this.translate);
|
|
});
|
|
|
|
it("should populate the scope with available languages", function() {
|
|
expect(this.scope.langs).not.toBeNull();
|
|
});
|
|
|
|
it("should set the default language", function() {
|
|
expect(this.scope.optlang).toEqual(this.scope.langs[0]);
|
|
});
|
|
|
|
it("should change the default language", function() {
|
|
this.scope.changeLang('blah')
|
|
expect(this.scope.optlang).toEqual('blah')
|
|
});
|
|
});
|