"use strict";

var _chai = require("chai");

var _sessionItemResults = require("../sessionItemResults");

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

describe('adding a SessionItemResult action creators', function () {
  it('returns well formed session item results', function () {
    var fakeSessionItemResults = [{
      id: '1',
      score: 3.0,
      attempt: 1,
      item_id: '1',
      feedback: 'hold the door'
    }, {
      id: '2',
      score: 2.5,
      attempt: 1,
      item_id: '2',
      feedback: 'what a save!'
    }];
    var addSIRAction = (0, _sessionItemResults.addSessionItemResults)(fakeSessionItemResults);
    (0, _chai.expect)(addSIRAction).to.deep.equal({
      type: _constants.ADD_SESSION_ITEM_RESULTS,
      payload: fakeSessionItemResults
    });
  });
});