"use strict";

var _immutable = require("immutable");

var _index = require("../index");

describe('connected BankEntriesList', function () {
  var fakeState = (0, _immutable.fromJS)({
    bankEntries: {
      1: {
        entryType: 'Item'
      },
      2: {
        entryType: 'Other'
      }
    }
  });
  var fakeProps = {
    recordIds: (0, _immutable.List)(['1', '2'])
  };
  describe('mapStateToProps', function () {
    it('maps recordIds to bankEntries state, sorted by title', function () {
      var props = (0, _index.mapStateToProps)(fakeState, fakeProps);
      expect(props.bankEntries.map(function (b) {
        return b.entryType;
      }).toJS()).to.eql(['Item', 'Other']);
    });
  });
});