"use strict";

var _chai = require("chai");

var _config = require("../config");

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

describe('config action creators', function () {
  it('returns a setAPIEndpoint action ', function () {
    var endpoint = 'data:text/plain,laughs in plain text';
    var action = (0, _config.setAPIEndpoint)(endpoint);
    var expectedAction = {
      type: _constants.SET_API_ENDPOINT,
      payload: endpoint
    };
    (0, _chai.expect)(action).to.deep.equal(expectedAction);
  });
  it('returns a setUserToken action ', function () {
    var token = 'token1';
    var action = (0, _config.setUserToken)(token);
    var expectedAction = {
      type: _constants.SET_USER_TOKEN,
      payload: token
    };
    (0, _chai.expect)(action).to.deep.equal(expectedAction);
  });
});