mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
fix timezone issue with test dates
This commit is contained in:
@@ -25,7 +25,7 @@ import { getMockFormService } from '../../mocks/form-service.mock';
|
||||
import { FormBuilderService } from '../../form/builder/form-builder.service';
|
||||
import { EpersonGroupListComponent } from './eperson-group-list/eperson-group-list.component';
|
||||
import { FormComponent } from '../../form/form.component';
|
||||
import { stringToNgbDateStruct } from '../../date.util';
|
||||
import { stringToNgbDateStruct, dateToISOFormat } from '../../date.util';
|
||||
import { ResourcePolicy } from '../../../core/resource-policy/models/resource-policy.model';
|
||||
import { RESOURCE_POLICY } from '../../../core/resource-policy/models/resource-policy.resource-type';
|
||||
import { EPersonMock } from '../../testing/eperson.mock';
|
||||
@@ -107,8 +107,8 @@ export const submittedResourcePolicy = Object.assign(new ResourcePolicy(), {
|
||||
description: 'description',
|
||||
policyType: PolicyType.TYPE_WORKFLOW,
|
||||
action: ActionType.WRITE,
|
||||
startDate: '2019-04-14T00:00:00Z',
|
||||
endDate: '2020-04-14T00:00:00Z',
|
||||
startDate: dateToISOFormat('2019-04-14T00:00:00Z'),
|
||||
endDate: dateToISOFormat('2020-04-14T00:00:00Z'),
|
||||
type: RESOURCE_POLICY
|
||||
});
|
||||
|
||||
|
@@ -35,6 +35,7 @@ import { getMockSectionUploadService } from '../../../../shared/mocks/section-up
|
||||
import { FormFieldMetadataValueObject } from '../../../../shared/form/builder/models/form-field-metadata-value.model';
|
||||
import { SubmissionSectionUploadFileEditComponent } from './edit/section-upload-file-edit.component';
|
||||
import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service';
|
||||
import { dateToISOFormat } from '../../../../shared/date.util';
|
||||
|
||||
describe('SubmissionSectionUploadFileComponent test suite', () => {
|
||||
|
||||
@@ -232,8 +233,8 @@ describe('SubmissionSectionUploadFileComponent test suite', () => {
|
||||
|
||||
const accessConditionsToSave = [
|
||||
{ name: 'openaccess' },
|
||||
{ name: 'lease', endDate: '2019-01-16T00:00:00Z' },
|
||||
{ name: 'embargo', startDate: '2019-01-16T00:00:00Z' },
|
||||
{ name: 'lease', endDate: dateToISOFormat('2019-01-16T00:00:00Z') },
|
||||
{ name: 'embargo', startDate: dateToISOFormat('2019-01-16T00:00:00Z') },
|
||||
];
|
||||
comp.saveBitstreamData(event);
|
||||
tick();
|
||||
|
Reference in New Issue
Block a user