03bc92006d
* Added test for AppImPanelControllerSpec, cleaned up style of all tests All tests give 0 errors when running gulp standard All credits for those test still go to @Ryuno-Ki, I did not functionaly change the testing code * add Test for DocumentModalController * added tests for the EmbedModalController and VideoModalController
53 lines
1.4 KiB
JavaScript
53 lines
1.4 KiB
JavaScript
/* global describe, it, inject, expect, beforeEach, xit */
|
|
|
|
describe('AppLangSelectController', function () {
|
|
var $controller, $scope
|
|
|
|
beforeEach(module('ui.bootstrap'))
|
|
beforeEach(module('myApp.services'))
|
|
beforeEach(module('myApp.controllers'))
|
|
|
|
beforeEach(function () {
|
|
inject(function (_$controller_, _$rootScope_, _, Storage, ErrorService, AppRuntimeManager) {
|
|
$controller = _$controller_
|
|
$scope = _$rootScope_.$new()
|
|
$controller('AppLangSelectController', {
|
|
$scope: $scope,
|
|
_: _,
|
|
Storage: Storage,
|
|
ErrorService: ErrorService,
|
|
AppRuntimeManager: AppRuntimeManager
|
|
})
|
|
})
|
|
})
|
|
|
|
it('holds the supportedLocales', function () {
|
|
expect($scope.supportedLocales).toBeDefined()
|
|
})
|
|
|
|
it('holds langNames', function () {
|
|
expect($scope.langNames).toBeDefined()
|
|
})
|
|
|
|
it('holds the current locale', function () {
|
|
expect($scope.curLocale).toBeDefined()
|
|
})
|
|
|
|
it('has a locale form', function () {
|
|
expect($scope.form).toBeDefined()
|
|
expect($scope.form.locale).toBeDefined()
|
|
})
|
|
|
|
it('allows to select a locale', function () {
|
|
expect($scope.localeSelect).toBeDefined()
|
|
})
|
|
|
|
describe('when the user switches the locale', function () {
|
|
describe('and confirms the dialogue', function () {
|
|
xit('reloads the app', function (done) {
|
|
done()
|
|
})
|
|
})
|
|
})
|
|
})
|