mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
fixed tests
This commit is contained in:
@@ -152,29 +152,33 @@ describe('ResourcePolicyCreateComponent test suite', () => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
it('should init component properly', () => {
|
||||
it('should init component properly', (done) => {
|
||||
fixture.detectChanges();
|
||||
expect(compAsAny.targetResourceUUID).toBe('itemUUID');
|
||||
expect(compAsAny.targetResourceName).toBe('test item');
|
||||
done();
|
||||
});
|
||||
|
||||
it('should redirect to authorizations page', () => {
|
||||
it('should redirect to authorizations page', (done) => {
|
||||
comp.redirectToAuthorizationsPage();
|
||||
expect(compAsAny.router.navigate).toHaveBeenCalled();
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return true when is Processing', () => {
|
||||
it('should return true when is Processing', (done) => {
|
||||
compAsAny.processing$.next(true);
|
||||
expect(comp.isProcessing()).toBeObservable(cold('a', {
|
||||
a: true
|
||||
}));
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return false when is not Processing', () => {
|
||||
it('should return false when is not Processing', (done) => {
|
||||
compAsAny.processing$.next(false);
|
||||
expect(comp.isProcessing()).toBeObservable(cold('a', {
|
||||
a: false
|
||||
}));
|
||||
done();
|
||||
});
|
||||
|
||||
describe('when target type is group', () => {
|
||||
|
@@ -137,28 +137,32 @@ describe('ResourcePolicyEditComponent test suite', () => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
it('should init component properly', () => {
|
||||
it('should init component properly', (done) => {
|
||||
fixture.detectChanges();
|
||||
expect(compAsAny.resourcePolicy).toEqual(resourcePolicy);
|
||||
done();
|
||||
});
|
||||
|
||||
it('should redirect to authorizations page', () => {
|
||||
it('should redirect to authorizations page', (done) => {
|
||||
comp.redirectToAuthorizationsPage();
|
||||
expect(compAsAny.router.navigate).toHaveBeenCalled();
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return true when is Processing', () => {
|
||||
it('should return true when is Processing', (done) => {
|
||||
compAsAny.processing$.next(true);
|
||||
expect(comp.isProcessing()).toBeObservable(cold('a', {
|
||||
a: true
|
||||
}));
|
||||
done();
|
||||
});
|
||||
|
||||
it('should return false when is not Processing', () => {
|
||||
it('should return false when is not Processing', (done) => {
|
||||
compAsAny.processing$.next(false);
|
||||
expect(comp.isProcessing()).toBeObservable(cold('a', {
|
||||
a: false
|
||||
}));
|
||||
done();
|
||||
});
|
||||
|
||||
describe('', () => {
|
||||
|
Reference in New Issue
Block a user