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.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
/* global describe, it, inject, expect, beforeEach */
|
|
|
|
describe('AppWelcomeController', function () {
|
|
var $controller, $rootScope, $scope, $location, MtpApiManager, ErrorService,
|
|
ChangelogNotifyService, LayoutSwitchService
|
|
|
|
beforeEach(module('myApp.controllers'))
|
|
|
|
beforeEach(function () {
|
|
ChangelogNotifyService = {
|
|
checkUpdate: function () {}
|
|
}
|
|
|
|
LayoutSwitchService = {
|
|
start: function () {}
|
|
}
|
|
|
|
MtpApiManager = {
|
|
getUserID: function () {
|
|
return {
|
|
then: function () {}
|
|
}
|
|
}
|
|
}
|
|
|
|
module(function ($provide) {
|
|
$provide.value('MtpApiManager', MtpApiManager)
|
|
})
|
|
|
|
inject(function (_$controller_, _$rootScope_, _$location_) {
|
|
$controller = _$controller_
|
|
$rootScope = _$rootScope_
|
|
$location = _$location_
|
|
|
|
$scope = $rootScope.$new()
|
|
$controller('AppWelcomeController', {
|
|
$scope: $scope,
|
|
$location: $location,
|
|
MtpApiManager: MtpApiManager,
|
|
ErrorService: ErrorService,
|
|
ChangelogNotifyService: ChangelogNotifyService,
|
|
LayoutSwitchService: LayoutSwitchService
|
|
})
|
|
})
|
|
})
|
|
|
|
// https://stackoverflow.com/a/36460924
|
|
it('executes a dummy spec', function (done) {
|
|
expect(true).toBe(true)
|
|
done()
|
|
})
|
|
})
|