 
 	describe 'with a responseError hook', ->
 
-		it 'should not call requestError if there are no errors', ->
+		it 'should not call responseError if there are no errors', ->
 			request.interceptors[0] = responseError: m.sinon.mock()
 
 			promise = request.send

				m.chai.expect(request.interceptors[0].responseError.called).to.equal false,
					'responseError should not have been called'

		it 'should call requestError if the server returns a server error', ->
			fetchMock.restore()
			fetchMock.get 'https://500.com', (url, opts) ->
				status: 500

			request.interceptors[0] = responseError: m.sinon.mock().throws(new Error('caught error'))

			promise = request.send
				url: 'https://500.com'

			m.chai.expect(promise).to.be.rejectedWith('caught error')

		it 'should call requestError if the server returns an authentication error', ->
			fetchMock.restore()
			fetchMock.get 'https://401.com', (url, opts) ->
				status: 401

			request.interceptors[0] = responseError: m.sinon.mock().throws(new Error('caught auth error'))

			promise = request.send
				url: 'https://401.com'

			m.chai.expect(promise).to.be.rejectedWith('caught auth error')

		it 'should let requestError retry a different request', ->
			fetchMock.restore()
			fetchMock.get '*', (url, opts) ->
				if url is 'https://ok.com'

			headers:
				'Content-Type': 'application/json'

		request.interceptors = []

	afterEach ->
		fetchMock.restore()
