mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-12 10:33:49 +00:00
Implemented importing servers from CSV file
This commit is contained in:
@@ -2,8 +2,6 @@ import reduce, {
|
||||
_createServer,
|
||||
_deleteServer,
|
||||
_listServers,
|
||||
CREATE_SERVER,
|
||||
DELETE_SERVER,
|
||||
FETCH_SERVERS,
|
||||
} from '../../../src/servers/reducers/server';
|
||||
import * as sinon from 'sinon';
|
||||
@@ -24,17 +22,6 @@ describe('serverReducer', () => {
|
||||
expect(reduce({}, { type: FETCH_SERVERS, servers })).toEqual(servers)
|
||||
);
|
||||
|
||||
it('returns servers when action is DELETE_SERVER', () =>
|
||||
expect(reduce({}, { type: DELETE_SERVER, servers })).toEqual(servers)
|
||||
);
|
||||
|
||||
it('adds server to list when action is CREATE_SERVER', () => {
|
||||
const server = { id: 'abc123' };
|
||||
expect(reduce({}, { type: CREATE_SERVER, server })).toEqual({
|
||||
[server.id]: server
|
||||
})
|
||||
});
|
||||
|
||||
it('returns default when action is unknown', () =>
|
||||
expect(reduce({}, { type: 'unknown' })).toEqual({})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user