restore PS xit tests (#3173)

This commit is contained in:
Eugenio Romano
2018-04-11 17:23:56 +01:00
committed by GitHub
parent 38de016893
commit 8b4af90b46
6 changed files with 22 additions and 64 deletions

View File

@@ -77,10 +77,6 @@ describe('TaskListComponent', () => {
]
};
let mockErrorTaskList = {
error: 'wrong request'
};
let fakeCutomSchema = [
{
'key': 'fakeName',
@@ -362,27 +358,6 @@ describe('TaskListComponent', () => {
expect(dataRow[1].isSelected).toEqual(true);
});
xit('should throw an exception when the response is wrong', (done) => {
let state = new SimpleChange(null, 'open', true);
let assignment = new SimpleChange(null, 'fake-assignee', true);
component.error.subscribe((err) => {
expect(err).toBeDefined();
expect(err.error).toBe('wrong request');
done();
});
component.ngAfterContentInit();
fixture.detectChanges();
component.ngOnChanges({'state': state, 'assignment': assignment});
jasmine.Ajax.requests.mostRecent().respondWith({
'status': 404,
contentType: 'application/json',
responseText: JSON.stringify(mockErrorTaskList)
});
});
it('should reload tasks when reload() is called', (done) => {
component.state = 'open';
component.assignment = 'fake-assignee';