 benv = require 'benv'
 sinon = require 'sinon'
 Backbone = require 'backbone'
-ArtworkAuctionView = benv.requireWithJadeify require.resolve('../view.coffee'), ['template']
 
 describe 'auction', ->
   before (done) ->
+    sinon.stub global, 'setInterval'
     benv.setup ->
       benv.expose $: benv.require 'jquery'
       Backbone.$ = $

            cents: 6000000

    after ->
      ArtworkAuctionView.__set__
        CURRENT_USER: null
        AUCTION: null

    beforeEach ->
      sinon.stub ArtworkAuctionView::, 'redirectTo'
      @view.data.accounting = accounting
      @view.data.user = 'existy'
      @view.render()


  describe '#submit', ->
    before ->
      @ArtworkAuctionView.__set__
        CURRENT_USER: 'existy'
        AUCTION:
          artwork_id: 'peter-alexander-wedge-with-puff'
