   describe 'artwork caption', ->
     beforeEach ->
       @artwork = new Artwork fabricate 'artwork'
+      @artist = new Artist fabricate 'artist'
+      @artist2= new Artist fabricate 'artist', {name: 'Kana', public: true}
+      @artwork.related().artists = new Artists @artist
       @html = render('artwork')({ artwork: @artwork })
 
     it 'displays the artwork title and year', ->


    it 'displays the artist name if available', ->
      $ = cheerio.load @html
      $('.artwork-item-artist').text().should.equal @artwork.artistName()
      $('.artwork-item-artist a').should.have.lengthOf 0

    it 'links to the artist if it\'s public', ->
      @artwork.get('artist').public = true
      $ = cheerio.load render('artwork')({ artwork: @artwork })
      $('.artwork-item-artist a').text().should.equal @artwork.artistName()
      $('.artwork-item-artist a').attr('href').should.equal @artwork.artistLink()

    it 'links to the partner name', ->
      @artwork.get('partner').default_profile_public = true

Backbone = require 'backbone'
{ fabricate } = require 'antigravity'
Artwork = require '../../../models/artwork'
Artists = require '../../../collections/artists'
Artist = require '../../../models/artist'
SaleArtwork = require '../../../models/sale_artwork'

render = (template) ->
