fixed merge conflicts in specrunner

This commit is contained in:
thoughtworker 2013-11-27 11:30:54 -06:00
commit 9f3d196ea5
2 changed files with 25 additions and 0 deletions

View File

@ -33,6 +33,7 @@
<script type="text/javascript" src="../app/scripts/controllers/user/UserFormController.js"></script>
<script type="text/javascript" src="../app/scripts/controllers/user/UserListController.js"></script>
<script type="text/javascript" src="../app/scripts/controllers/client/ClientController.js"></script>
<script type="text/javascript" src="../app/scripts/controllers/user/UserSettingController.js"></script>
<!-- include spec files here... -->
@ -53,6 +54,7 @@
<script type="text/javascript" src="spec/controllers/UserFormControllerSpec.js"></script>
<script type="text/javascript" src="spec/controllers/UserListControllerSpec.js"></script>
<script type="text/javascript" src="spec/controllers/ClientControllerSpec.js"></script>
<script type="text/javascript" src="spec/controllers/UserSettingControllerSpec.js"></script>

View File

@ -0,0 +1,23 @@
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')
});
});