"use strict";

var _errorsShowing = require("../errorsShowing");

var _constants = require("@instructure/quiz-common/lib/constants");

describe('errorsShowing action creators', function () {
  it('returns a clear_errors_showing action', function () {
    expect((0, _errorsShowing.clearErrorsShowing)()).to.eql({
      type: _constants.CLEAR_ERRORS_SHOWING,
      payload: {}
    });
  });
  it('returns a well-formed show error action', function () {
    var showErrorAction = (0, _errorsShowing.showError)('someKey');
    expect(showErrorAction).to.deep.equal({
      type: _constants.SHOW_ERROR,
      payload: {
        key: 'someKey'
      }
    });
  });
  it('returns a well-formed hide error action', function () {
    var hideErrorAction = (0, _errorsShowing.hideError)('aDifferentKey');
    expect(hideErrorAction).to.deep.equal({
      type: _constants.HIDE_ERROR,
      payload: {
        key: 'aDifferentKey'
      }
    });
  });
});