edit folder error notification (#296)

This commit is contained in:
Cilibiu Bogdan
2018-04-11 12:03:27 +03:00
committed by Denys Vuika
parent 4f48ed9361
commit b47fc2cb3f
6 changed files with 48 additions and 2 deletions

View File

@@ -63,6 +63,7 @@ describe('FilesComponent', () => {
let browsingFilesService: BrowsingFilesService;
let nodeActionsService: NodeActionsService;
let preferenceService: UserPreferencesService;
let notificationService: NotificationService;
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -121,6 +122,7 @@ describe('FilesComponent', () => {
router = TestBed.get(Router);
alfrescoContentService = TestBed.get(ContentService);
browsingFilesService = TestBed.get(BrowsingFilesService);
notificationService = TestBed.get(NotificationService);
nodeActionsService = TestBed.get(NodeActionsService);
preferenceService = TestBed.get(UserPreferencesService);
});
@@ -531,4 +533,16 @@ describe('FilesComponent', () => {
expect(preferenceService.set).toHaveBeenCalledWith('prefix.sorting.direction', 'desc');
});
});
describe('openSnackMessage', () => {
it('should call notification service', () => {
const message = 'notification message';
spyOn(notificationService, 'openSnackMessage');
component.openSnackMessage(message);
expect(notificationService.openSnackMessage).toHaveBeenCalledWith(message, 4000);
});
});
});