"use strict";

var _immutable = require("immutable");

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

describe('ModerateTray', function () {
  describe('mapStateToProps', function () {
    it('passes open/closed state to the component', function () {
      [true, false].forEach(function (open) {
        var state = (0, _immutable.fromJS)({
          moderation: {
            trayOpen: open
          }
        });
        expect((0, _index.mapStateToProps)(state).isOpen).to.equal(open);
      });
    });
    it('passes participantName to the component', function () {
      var name = 'ohai';
      var state = (0, _immutable.fromJS)({
        moderation: {
          selectedParticipantName: name
        }
      });
      expect((0, _index.mapStateToProps)(state).participantName).to.equal(name);
    });
  });
});