"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var actions = _interopRequireWildcard(require("../banks"));

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

describe('banks actions creators', function () {
  describe('#addBanks', function () {
    it('returns a well-formed and correct action', function () {
      expect(actions.addBanks([{}])).to.deep.equal({
        type: _constants.ADD_BANKS,
        payload: [{}]
      });
    });
  });
  describe('#associateEntries', function () {
    it('returns a well-formed and correct action', function () {
      expect(actions.associateEntries(123, [1, 2])).to.deep.equal({
        type: _constants.ASSOCIATE_ENTRIES,
        payload: {
          bankId: 123,
          bankEntryIds: [1, 2]
        }
      });
    });
  });
  describe('#disassociateEntry', function () {
    it('returns a well-formed and correct action', function () {
      expect(actions.disassociateEntry(123, 2)).to.deep.equal({
        type: _constants.DISASSOCIATE_ENTRY,
        payload: {
          bankId: 123,
          bankEntryId: 2
        }
      });
    });
  });
  describe('#removebank', function () {
    it('returns a well-formed and correct action', function () {
      expect(actions.removeBank('7')).to.deep.equal({
        type: _constants.REMOVE_BANK,
        payload: '7'
      });
    });
  });
  describe('#archiveBank', function () {
    it('returns a well-formed and correct action', function () {
      expect(actions.archiveBank('5')).to.deep.equal({
        type: _constants.ARCHIVE_BANK,
        payload: '5'
      });
    });
  });
});