"use strict";

var _react = _interopRequireDefault(require("react"));

var _enzyme = require("enzyme");

var _Placeholder = _interopRequireDefault(require("./Placeholder"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

describe("Placeholder", function () {
  it("should render a placeholder with a default message", function () {
    var placeholder = (0, _enzyme.render)(_react["default"].createElement(_Placeholder["default"], null));
    expect(placeholder.find("h1").text()).to.contain("Content Placeholder");
    expect(placeholder.find("p")).to.exist;
  });
  it("should provide correct issue text and have a link when given an issue", function () {
    var placeholder = (0, _enzyme.render)(_react["default"].createElement(_Placeholder["default"], {
      issue: "22"
    }));
    expect(placeholder.find("h1").text()).to.contain("Card In Progress");
    expect(placeholder.find("a")).to.exist;
  });
  it("should render a placeholder with a custom message when the placeholder has children", function () {
    var customMessage = "A customized message";
    var placeholder = (0, _enzyme.render)(_react["default"].createElement(_Placeholder["default"], null, customMessage));
    expect(placeholder.text()).to.eql(customMessage);
    expect(placeholder.find("h1")).not.to.exist;
    expect(placeholder.find("p")).not.to.exist;
  });
});