       expect(@xhr.preflight).to.equal true
 
   describe '#send', ->
+    beforeEach ->
+      client = new Dropbox.Client testKeys
+      @url = client.urls.requestToken
+
     it 'reports errors correctly', (done) ->
-      @url = 'https://api.dropbox.com/1/oauth/request_token'
       @xhr = new Dropbox.Xhr 'POST', @url
       @xhr.prepare().send (error, data) =>
         expect(data).to.equal undefined

        done()

    it 'processes data correctly', (done) ->
      xhr = new Dropbox.Xhr 'POST',
                            'https://api.dropbox.com/1/oauth/request_token',
      xhr.addOauthParams @oauth
      xhr.prepare().send (error, data) ->
        expect(error).to.not.be.ok

        done()

    it 'processes data correctly when using setCallback', (done) ->
      xhr = new Dropbox.Xhr 'POST', @url
      xhr.addOauthParams @oauth
      xhr.setCallback (error, data) ->
        expect(error).to.not.be.ok
