Merge ErrorsStore into UiStore

This commit is contained in:
Tom Moor
2018-05-31 11:42:39 -07:00
parent 55e1451160
commit f633f63a61
18 changed files with 105 additions and 158 deletions

View File

@@ -28,22 +28,5 @@ describe('Collection model', () => {
expect(client.post).toHaveBeenCalledWith('/collections.info', { id: 123 });
expect(collection.name).toBe('New collection');
});
test('should report errors', async () => {
client.post = jest.fn(() => Promise.reject())
const collection = new Collection({
id: 123,
});
collection.errors = {
add: jest.fn(),
};
await collection.fetch();
expect(collection.errors.add).toHaveBeenCalledWith(
'Collection failed loading'
);
});
});
});