"use strict";

var _ExpandableItem = require("../ExpandableItem");

describe('ExpandableItem', function () {
  describe('computed', function () {
    describe('label', function () {
      it('should use noneText when label is not set', function () {
        var expected = 'noneText';

        var actual = _ExpandableItem.ExpandableItemBase.computed.label({
          noneText: 'noneText'
        });

        expect(actual).to.equal(expected);
      });
      it('should use label when set', function () {
        var expected = 'label';

        var actual = _ExpandableItem.ExpandableItemBase.computed.label({
          label: 'label',
          noneText: 'noneText'
        });

        expect(actual).to.equal(expected);
      });
    });
    describe('open', function () {
      it('should be false when disabled', function () {
        var expected = false;

        var actual = _ExpandableItem.ExpandableItemBase.computed.open({
          disabled: true,
          open: true
        });

        expect(actual).to.equal(expected);
      });
    });
  });
});