Add database delete code test
parent
3d9584d79d
commit
b8cd78b67d
|
@ -16,6 +16,7 @@ import {
|
|||
removeDatabase,
|
||||
filterRoles,
|
||||
filterUsers,
|
||||
startDeleteDatabase,
|
||||
} from 'src/admin/actions'
|
||||
|
||||
import {
|
||||
|
@ -154,6 +155,16 @@ describe('Admin.Reducers', () => {
|
|||
const actual = reducer(state, removeDatabase(db1))
|
||||
const expected = []
|
||||
|
||||
expect(actual.databases).to.deep.equal(expected)
|
||||
})
|
||||
|
||||
it('can start delete database by adding a delete code', () => {
|
||||
const actual = reducer(state, startDeleteDatabase(db1))
|
||||
const expected = [
|
||||
{...db1, deleteCode: ''}
|
||||
]
|
||||
|
||||
|
||||
expect(actual.databases).to.deep.equal(expected)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue