 
   beforeEach (done) ->
     sinon.stub Backbone, 'sync'
-    @artwork = new Artwork fabricate 'artwork'
-    @view = new LayeredSearchView $el: $('<div></div>'), artwork: @artwork
+    @artwork  = new Artwork fabricate 'artwork'
+    @view     = new LayeredSearchView $el: $('<div></div>'), artwork: @artwork
     done()
 
   afterEach ->

        type: 'main'
      @layers.reset layers

    it 'should have a collection and subsequently an artworkId', ->
      @layers.first().collection.length.should.be.ok
      @layers.first().artworkId.should.equal @artworkId

    it 'should have an artworks collection with the appropriate URL', ->
      layer = @layers.first()
      layer.artworks.url.
        should.include "/api/v1/related/layer/#{layer.get('type')}/#{layer.id}/artworks?artwork[]=#{layer.artworkId}"

describe 'LayeredSearchView', ->
  before (done) ->

describe 'Layers, Layer', ->
  beforeEach ->
    sinon.stub Backbone, 'sync'
    @artwork  = new Artwork fabricate 'artwork'
    @layers   = new Layers artwork: @artwork

  afterEach ->
    Backbone.sync.restore()

  describe 'Layers', ->
    it 'should have an artwork', ->
      @layers.artwork.should.equal @artwork

    it 'should fetch the correct URL', ->
      @layers.fetch()
      @layers.url.should.include 'api/v1/related/layers'
      Backbone.sync.args[0][1].artwork.id.should.equal @artwork.id

  describe 'Layer', ->
    beforeEach ->
