"use strict";

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

var _showOriginButton = _interopRequireDefault(require("../../utils/showOriginButton"));

var _images = require("../../../../tests/testData/images");

describe('showOriginButton', function () {
  it('should return true if image has originSrc', function () {
    var actual = (0, _showOriginButton.default)(_images.originImages, 1);
    expect(actual).toBeTruthy();
  });
  it('should return false if image does not have originSrc', function () {
    var actual = (0, _showOriginButton.default)([{
      src: 'a'
    }, {
      src: 'b'
    }], 0);
    expect(actual).toBeFalsy();
  });
  it('should return false if image not found', function () {
    var actual = (0, _showOriginButton.default)([{
      src: 'a'
    }, {
      src: 'b'
    }], 2);
    expect(actual).toBeFalsy();
  });
  it('should return false if index is undefined', function () {
    var actual = (0, _showOriginButton.default)([{
      src: 'a'
    }, {
      src: 'b'
    }]);
    expect(actual).toBeFalsy();
  });
});