"use strict";

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

var _Fetcher = _interopRequireDefault(require("../../util/Fetcher"));

var _interactionTypes = require("../interactionTypes");

describe('interaction types api action', function () {
  describe('interactionTypeFetch', function () {
    var fetchStub = sinon.stub();
    var dispatchStub = sinon.stub();
    var getStateStub = sinon.stub();
    useFakeFetching({
      dispatchStub: dispatchStub,
      getStateStub: getStateStub,
      fetchStub: fetchStub
    });
    it('hits the correct url', function () {
      var expectedUrl = '/api/interaction_types';
      _Fetcher.default.fakeFetch = fetchStub;
      (0, _interactionTypes.interactionTypeFetch)()(dispatchStub, getStateStub);
      expect(fetchStub.calledWith(expectedUrl)).to.be.true();
    });
  });
});