community-app/test/spec/controllers/UserSettingControllerSpec.js
2013-11-27 11:12:31 -06:00

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')
});
});