"use strict";

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

var _immutable = require("immutable");

var _outcomes = _interopRequireDefault(require("../outcomes"));

var _outcomes2 = require("../../actions/outcomes");

describe('outcomes reducer', function () {
  it('properly sets context uuid', function () {
    var uuid = 'alphabeta';
    var initialState = (0, _immutable.Map)();
    var action = (0, _outcomes2.setContextUuid)(uuid);
    var nextState = (0, _outcomes.default)(initialState, action);
    expect(nextState.get('contextUuid')).to.equal(uuid);
  });
  it('properly sets outcomes endpoint', function () {
    var endpoint = 'http://outcomes.test';
    var initialState = (0, _immutable.Map)();
    var action = (0, _outcomes2.setOutcomesEndpoint)(endpoint);
    var nextState = (0, _outcomes.default)(initialState, action);
    expect(nextState.get('outcomesEndpoint')).to.equal(endpoint);
  });
  it('properly sets outcomes token', function () {
    var token = 'alphabetacharlie';
    var initialState = (0, _immutable.Map)();
    var action = (0, _outcomes2.setOutcomesToken)(token);
    var nextState = (0, _outcomes.default)(initialState, action);
    expect(nextState.get('outcomesToken')).to.equal(token);
  });
});