import { expect } from 'chai'
import { addItems } from '../items'
import { ADD_ITEMS } from '@instructure/quiz-common/lib/constants'

describe('items actions creators', () => {
  it('returns a addItems action', () => {
    const items = [
      {id: 1, title: 'quiz item 1'},
      {id: 2, title: 'quiz item 2'}
    ]
    const addItemAction = addItems(items)
    const expectedAction = {type: ADD_ITEMS, payload: items}

    expect(addItemAction).to.deep.equal(expectedAction)
  })
})
