Telegram Web, preconfigured for usage in I2P. http://web.telegram.i2p/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
862 B

'use strict'
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
/* global describe, it, inject, expect, beforeEach */
describe('AppFooterController', function () {
beforeEach(module('myApp.controllers'))
beforeEach(function () {
this.LayoutSwitchService = {
serviceFlag: false,
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
switchLayout: function (parameter) {
this.serviceFlag = true
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
}
}
inject(function (_$controller_, _$rootScope_) {
this.$controller = _$controller_
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
this.$scope = _$rootScope_.$new()
this.$controller('AppFooterController', {
$scope: this.$scope,
LayoutSwitchService: this.LayoutSwitchService
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
})
})
})
// define tests
it('calls the right function', function (done) {
expect(this.LayoutSwitchService.serviceFlag).toBe(false)
this.$scope.switchLayout(true)
expect(this.LayoutSwitchService.serviceFlag).toBe(true)
Added test for ChangeLogModalController, AppFooterController and PeerSelectController (#1355) * Added test for ChangeLogModalController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 3.5 | 0 | 0.36 | 3.52 | | New | 4.22 | 0.36 | 1.08 | 4.24 | * Added tests for AppFooterController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.22 | 0.36 | 1.08 | 4.24 | | New | 4.29 | 0.36 | 1.44 | 4.31 | * Added tests for PeerSelectController This commit changes the test scores as follows | | % Statements | % Branch | % Functions | % Lines | |:---:|:------------:|:--------:|-------------|---------| | Old | 4.29 | 0.36 | 1.44 | 4.31 | | New | 5.61 | 1.16 | 2.88 | 5.64 | * Change Time-out time to variable Instead of doing time-outs based on a constant, the time-out is based on a variable. This will make changing the time of time-out easier. * Rename AppFooterController test, removed unnecessary test, fixed code style Renamed test/unit/AppFooterController.js to test/unit/AppFooterControllerSpec.js to conform with other test files. Removed a test in the renamed file. It only tested if the controller would compile given the test-environment, something that was implicitly tested in the other (now only) test. The code style over all test files was not consistent (spacing), this is fixed. * Changed style to StandardJS When running "standard test/unit/..", there were some errors on the code-style of the tests These are fixed
8 years ago
done()
})
})