Prefer object literal notation in Karma tests

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/2184/head
Alex Coles 10 years ago
parent f9be98c95e
commit 4d8247fa75
  1. 2
      karma/tests/layout/query-menu-item-factory-test.js
  2. 2
      karma/tests/services/query-service-test.js
  3. 2
      karma/tests/services/work-package-service-test.js
  4. 2
      karma/tests/ui_components/authoring-directive-test.js
  5. 2
      karma/tests/ui_components/date-time-directive-test.js
  6. 2
      karma/tests/ui_components/sort-link-directive-test.js
  7. 2
      karma/tests/ui_components/toggled-multiselect-directive-test.js
  8. 2
      karma/tests/work_packages/column-context-menu-test.js
  9. 2
      karma/tests/work_packages/controllers/work-package-details-controller-test.js
  10. 2
      karma/tests/work_packages/controllers/work-packages-controller-test.js
  11. 2
      karma/tests/work_packages/controllers/work-packages-list-controller-test.js
  12. 2
      karma/tests/work_packages/directives/options-dropdown-directive-test.js
  13. 2
      karma/tests/work_packages/directives/work-package-column-directive-test.js
  14. 2
      karma/tests/work_packages/directives/work-package-details-toolbar-test.js
  15. 2
      karma/tests/work_packages/directives/work-package-group-sums-directive-test.js
  16. 4
      karma/tests/work_packages/directives/work-package-relations-directive-test.js
  17. 2
      karma/tests/work_packages/directives/work-package-total-sums-directive-test.js
  18. 2
      karma/tests/work_packages/helpers/api-helper-test.js
  19. 2
      karma/tests/work_packages/helpers/work-package-context-menu-helper-test.js
  20. 2
      karma/tests/work_packages/helpers/work-package-table-helper-test.js
  21. 2
      karma/tests/work_packages/helpers/work-packages-helper-test.js
  22. 2
      karma/tests/work_packages/work-package-context-menu-test.js

@ -38,7 +38,7 @@ describe('queryMenuItemFactory', function() {
'openproject.models',
'openproject.api',
function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -38,7 +38,7 @@ describe('QueryService', function() {
'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -35,7 +35,7 @@ describe('WorkPackageService', function() {
beforeEach(module('openproject.api', 'openproject.layout','openproject.services', 'openproject.models'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -33,7 +33,7 @@ describe('authoring Directive', function() {
beforeEach(angular.mock.module('openproject.uiComponents', 'openproject.helpers', 'ngSanitize'));
beforeEach(module('templates', function($provide) {
timezoneService = new Object();
timezoneService = {};
timezoneService.parseDate = sinon.stub().returns(createdOn);

@ -37,7 +37,7 @@ describe('date time Directives', function() {
beforeEach(angular.mock.module('openproject.uiComponents', 'openproject.services'));
beforeEach(module('templates', function($provide) {
configurationService = new Object();
configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -31,7 +31,7 @@ describe('sort link Directive', function() {
beforeEach(angular.mock.module('openproject.uiComponents'));
beforeEach(module('templates', function($provide) {
sortService = new Object();
sortService = {};
sortService.isDescending = sinon.stub().returns(false);
sortService.getColumn = sinon.stub().returns('');

@ -33,7 +33,7 @@ describe('toggledMultiselect Directive', function() {
'openproject.workPackages.helpers',
'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -42,7 +42,7 @@ describe('columnContextMenu', function() {
'templates'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -97,7 +97,7 @@ describe('WorkPackageDetailsController', function() {
beforeEach(module('openproject.api', 'openproject.layout', 'openproject.services', 'openproject.workPackages.controllers', 'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -33,7 +33,7 @@ describe('WorkPackagesController', function() {
beforeEach(module('openproject.workPackages.controllers', 'openproject.api', 'openproject.layout','openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -37,7 +37,7 @@ describe('WorkPackagesListController', function() {
beforeEach(module('openproject.api', 'openproject.workPackages.controllers', 'openproject.workPackages.services', 'ng-context-menu', 'btford.modal', 'openproject.layout', 'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -36,7 +36,7 @@ describe('optionsDropdown Directive', function() {
'openproject.layout',
'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -32,7 +32,7 @@ describe('workPackageColumn Directive', function() {
beforeEach(angular.mock.module('openproject.workPackages.directives'));
beforeEach(module('templates', 'openproject.api', 'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -44,7 +44,7 @@ describe('workPackageDetailsToolbar', function() {
'openproject.workPackages.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
$provide.constant('$stateParams', stateParams);
$provide.constant('ConfigurationService', configurationService);

@ -33,7 +33,7 @@ describe('workPackageGroupSums Directive', function() {
'openproject.models',
'openproject.services'));
beforeEach(module('openproject.api', 'templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -39,7 +39,7 @@ describe('Work Package Relations Directive', function() {
'ngSanitize'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);
@ -94,7 +94,7 @@ describe('Work Package Relations Directive', function() {
var relationsHandlerWithNotAssignedRelatedWorkPackage;
var createRelationsHandlerStub = function($timeout, count) {
var relationsHandler = new Object();
var relationsHandler = {};
relationsHandler.relationsId = sinon.stub();
relationsHandler.isEmpty = sinon.stub();

@ -35,7 +35,7 @@ describe('workPackageTotalSums Directive', function() {
'openproject.services'));
beforeEach(module('openproject.api', 'templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -57,7 +57,7 @@ describe('API helper', function() {
describe('other codes', function() {
function createApiErrorObject(errorIdentifier, message, multiple) {
var apiError = new Object();
var apiError = {};
apiError._type = 'Error';
apiError.errorIdentifier = (multiple) ? 'urn:openproject-org:api:v3:errors:MultipleErrors' : errorIdentifier;

@ -36,7 +36,7 @@ describe('WorkPackageContextMenuHelper', function() {
beforeEach(module('openproject.workPackages.helpers', 'openproject.models', 'openproject.api', 'openproject.layout','openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -33,7 +33,7 @@ describe('WorkPackagesTableHelper', function() {
beforeEach(module('openproject.workPackages.helpers', 'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

@ -33,7 +33,7 @@ describe('Work packages helper', function() {
beforeEach(module('openproject.helpers', 'openproject.services'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub();
configurationService.dateFormatPresent = sinon.stub();

@ -41,7 +41,7 @@ describe('workPackageContextMenu', function() {
'templates'));
beforeEach(module('templates', function($provide) {
var configurationService = new Object();
var configurationService = {};
configurationService.isTimezoneSet = sinon.stub().returns(false);

Loading…
Cancel
Save