Add database delete code test

pull/10616/head
Andrew Watkins 2017-03-21 15:56:41 -07:00
parent 3d9584d79d
commit b8cd78b67d
1 changed files with 11 additions and 0 deletions

View File

@ -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)
})
})