var __path__ = '../../src/components/ArtworkImage.js';

jest.dontMock(__path__);

describe('ArtworkImage', function() {
  var React, TestUtils, ArtworkImage;
  var artworkImage;

  beforeEach(function() {
    React = require('react/addons');
    TestUtils = React.addons.TestUtils;
    ArtworkImage = require(__path__);

    artworkImage = TestUtils.renderIntoDocument(
      <ArtworkImage path='/artwork/19199193' />
    )
  });

  it('works', function() {
    expect(true).toBeTruthy();
  });
});

var __path__ = '../../src/components/ArtworkImage.js';

jest.dontMock(__path__);

describe('ArtworkImage', function() {
  var React, TestUtils, ArtworkImage;
  var domNode, artworkImage;

  beforeEach(function() {
    React = require('react/addons');
    TestUtils = React.addons.TestUtils;
    ArtworkImage = require(__path__);

    artworkImage = TestUtils.renderIntoDocument(
      <ArtworkImage path='/artwork/19199193' />
    );
    domNode = React.findDOMNode(artworkImage);
  });

  describe('in the initial state', function() {
    it('should not be visible', function() {
      var classes = domNode.getAttribute('class').split(' ');
      expect(classes).not.toContain('visible');
    });
  });

  describe('after the image has loaded', function() {
    beforeEach(function() {
      TestUtils.Simulate.load(domNode);
    });

    it('should be visible', function() {
      var classes = domNode.getAttribute('class').split(' ');
      expect(classes).toContain('visible');
    });
  });

  describe('after the image has errored', function() {
    beforeEach(function() {
      TestUtils.Simulate.error(domNode);
    });

    it('should be visible', function() {
      var classes = domNode.getAttribute('class').split(' ');
      expect(classes).not.toContain('visible');
    });
  });

});

Add *useful* tests for the ArtworkImage component
Add *useful* tests for the ArtworkImage component
