import {
  POST_TO_PARENT
} from '@instructure/quiz-common/lib/constants'

import {
  postToParent
} from '../postMessage'

describe('postMessage actions', () => {
  it('returns a well-formed post to parent action', () => {
    const messageData = {subject: 'quizzesNext.postTest'}
    const postToParentAction = postToParent(messageData)
    expect(postToParentAction).to.deep.equal({
      type: POST_TO_PARENT,
      payload: messageData
    })
  })
})
