jest.dontMock('../../components/shared/SectionLoader.jsx');

import React from 'react/addons';
import SectionLoader from '../../components/shared/SectionLoader.jsx';

const TestUtils = React.addons.TestUtils;

function renderedOutput(elt) {
  const shallowRenderer = TestUtils.createRenderer();
  shallowRenderer.render(elt);
  return shallowRenderer.getRenderOutput();
}

describe('<SectionLoader />', () => {

  let sectionLoader;

  beforeEach(() => {
    sectionLoader = renderedOutput(<SectionLoader />);
  });

  it('should have the right tag', () => {
    expect(sectionLoader.type).toBe('div');
  });

  it('should have the right class names', () => {
    expect(sectionLoader.props.className).toBe('section-loader');
  });

});

@@ -29,35 +29,26 @@
 nts/shared/S
-ectionLoade
+ta
 r.jsx');%0A%0Aim
@@ -87,27 +87,18 @@
 import S
-ectionLoade
+ta
 r from '
@@ -122,27 +122,18 @@
 shared/S
-ectionLoade
+ta
 r.jsx';%0A
@@ -351,27 +351,18 @@
 ribe('%3CS
-ectionLoade
+ta
 r /%3E', (
@@ -376,28 +376,40 @@
 %0A  let s
-ectionLoader
+hallowStar, star, button
 ;%0A%0A  bef
@@ -429,27 +429,25 @@
  %7B%0A    s
-ectionLoade
+hallowSta
 r = rend
@@ -463,23 +463,226 @@
 t(%3CS
-ectionLoader /%3E
+tar repo='Blazar' branch='master'%3E%3C/Star%3E);%0A    star = TestUtils.renderIntoDocument(%3CStar repo='apple' branch='bacon'%3E%3C/Star%3E);%0A    button = TestUtils.findRenderedDOMComponentWithClass(%0A      star, 'sidebar__star'%0A    
 );%0A 
@@ -741,27 +741,25 @@
 expect(s
-ectionLoade
+hallowSta
 r.type).
@@ -768,11 +768,12 @@
 Be('
-div
+span
 ');%0A
@@ -796,69 +796,106 @@
 uld 
-have the right class names', () =%3E %7B%0A    expect(sectionLoader
+call event handler when clicked', () =%3E %7B%0A    star.setState(%7B starred: false %7D);%0A    expect(button
 .pro
@@ -919,21 +919,31 @@
 e('s
-ection-loader
+idebar__star unselected
 ');%0A
@@ -949,12 +949,13 @@
 %0A  %7D);%0A%0A
+%0A
 %7D);%0A

Add star spec