"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _immutable = require("immutable");

var _Bank = _interopRequireDefault(require("../../../../../../../common/records/Bank"));

var _QuizEntry = _interopRequireDefault(require("../../../../../../../common/records/QuizEntry"));

var _index = require("../index");

describe('QuizEntryBank Container', function () {
  var fakeQuizEntry = new _QuizEntry.default();
  var workingBank = new _Bank.default({
    id: '1',
    entryCount: 5
  });
  workingBank.properties = (0, _immutable.Map)();
  sinon.stub(fakeQuizEntry, 'getWorkingInstance').returns(fakeQuizEntry);
  sinon.stub(fakeQuizEntry, 'getEntry').returns(workingBank);
  var defaultProps = {
    displayPosition: 1,
    pointsPossible: '0',
    quizEntry: fakeQuizEntry,
    changeQuizEntryPoints: function changeQuizEntryPoints() {},
    changeQuizEntryProperties: function changeQuizEntryProperties() {},
    changeQuizEntryEntry: function changeQuizEntryEntry() {},
    clearModifications: function clearModifications() {},
    updateQuizEntry: function updateQuizEntry() {},
    questionSelection: 'all',
    sampleNum: '0',
    quizId: '0'
  };
  it('infers questionSelection from sampleNum in mapStateToProps', function () {
    var newProps = (0, _index.mapStateToProps)({
      get: function get() {
        return (0, _immutable.Map)();
      }
    }, defaultProps);
    expect(newProps.questionSelection).to.eq('all');
  });
});