               minimum_next_bid:
                 amount: '$60,000'
                 cents: 6000000
-        view = new ArtworkAuctionView data: data
+        view = new @ArtworkAuctionView data: data
         view.render()
 
         view.$('.artwork-auction__bid-status__bid').text()

benv = require 'benv'
sinon = require 'sinon'
Backbone = require 'backbone'
ArtworkAuctionView = benv.requireWithJadeify require.resolve('../view.coffee'), ['template']

describe 'auction', ->
  before (done) ->
    benv.setup ->
      benv.expose $: benv.require 'jquery'
      Backbone.$ = $

    afterEach ->
      @view.redirectTo.restore()

    xit 'submits the bid by redirecting to the confirmation page', ->
      @view.$('[name="bid"]').replaceWith '<input name="bid" value="60,000">'
      @view.$('button').click()
      @view.redirectTo.args[0][0]
