"use strict";

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

var _OutcomesPerStudentReport = _interopRequireDefault(require("outcomes-react/lib/containers/OutcomesPerStudentReport"));

var _presenter = _interopRequireDefault(require("../presenter"));

describe('OutcomeAnalysis', function () {
  var testbed = createTestbed(_presenter.default, {
    contextUuid: 'alphabeta',
    outcomesHost: 'foo.outcomes',
    outcomesToken: 'bar',
    quizId: '100'
  });
  it('should render OutcomesPerStudentReport component', function () {
    var loadUsersOverride = function loadUsersOverride() {};

    var showRollups = false;
    var wrapper = testbed.renderShallowly({
      loadUsersOverride: loadUsersOverride,
      showRollups: showRollups
    });
    var report = wrapper.find(_OutcomesPerStudentReport.default);
    expect(report.length).to.eq(1);
    expect(report.prop('contextUuid')).to.eq('alphabeta');
    expect(report.prop('host')).to.eq('foo.outcomes');
    expect(report.prop('jwt')).to.eq('bar');
    expect(report.prop('artifactType')).to.eq('quizzes.quiz');
    expect(report.prop('artifactId')).to.eq('100');
    expect(report.prop('loadUsersOverride')).to.eq(loadUsersOverride);
    expect(report.prop('showRollups')).to.eq(showRollups);
  });
  it('sets the correct default values for optional props', function () {
    var wrapper = testbed.renderShallowly();
    var report = wrapper.find(_OutcomesPerStudentReport.default);
    expect(report.length).to.eq(1);
    expect(report.prop('loadUsersOverride')).to.be.undefined();
    expect(report.prop('showRollups')).to.be.true();
  });
});