mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-17 13:03:50 +00:00
Added flag on short URL creation which tells if the short URL was already saved
This commit is contained in:
@@ -22,16 +22,16 @@ describe('shortUrlCreationReducer', () => {
|
||||
|
||||
it('returns loading on CREATE_SHORT_URL_START', () => {
|
||||
expect(reducer(undefined, action(createShortUrl.pending.toString()))).toEqual({
|
||||
result: null,
|
||||
saving: true,
|
||||
saved: false,
|
||||
error: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('returns error on CREATE_SHORT_URL_ERROR', () => {
|
||||
expect(reducer(undefined, action(createShortUrl.rejected.toString()))).toEqual({
|
||||
result: null,
|
||||
saving: false,
|
||||
saved: false,
|
||||
error: true,
|
||||
});
|
||||
});
|
||||
@@ -40,14 +40,15 @@ describe('shortUrlCreationReducer', () => {
|
||||
expect(reducer(undefined, action(createShortUrl.fulfilled.toString(), { payload: shortUrl }))).toEqual({
|
||||
result: shortUrl,
|
||||
saving: false,
|
||||
saved: true,
|
||||
error: false,
|
||||
});
|
||||
});
|
||||
|
||||
it('returns default state on RESET_CREATE_SHORT_URL', () => {
|
||||
expect(reducer(undefined, action(resetCreateShortUrl.toString()))).toEqual({
|
||||
result: null,
|
||||
saving: false,
|
||||
saved: false,
|
||||
error: false,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user