 				describe "and submission is not successful", ->
 
 					beforeEach ->
-						reqwestCallback = 'error'
-						reqwestResponse = mocks.errorResponse
+						reqwestSpy.andCallFake((params)-> params.error(mocks.errorXhr))
 						submitButton.click()
 
 					it "will call callbacks added to the submittedWithError", ->
-						expect(callbacks.submitErrorHappened).toHaveBeenCalledWith(form, errorResponse())
+						expect(callbacks.submitErrorHappened).toHaveBeenCalledWith(form, mocks.errorXhr)
 
 					it "will re-enable the submit button", ->
 						expect(submitButton.disabled).toBeFalsy()


				it "will attempt to submit the form", ->
					spyOn(submitter, 'submit')
					reqwestResponse = mocks.simpleSuccessResponse
					submitButton.click()
					expect(submitter.submit).toHaveBeenCalledWith(form, 'simple')


			expect(callbacks.validateErrorHappened).not.toHaveBeenCalled()

		it "will no longer call the success callbacks", ->
			reqwestSpy.andCallFake((params)-> params.success(mocks.simpleSuccessResponse))
			submitButton.click()
			expect(callbacks.submitSuccessHappened).not.toHaveBeenCalled()

		it "will no longer call the error callbacks", ->
			reqwestSpy.andCallFake((params)-> params.error(mocks.errorXhr))
			submitButton.click()
			expect(callbacks.submitErrorHappened).not.toHaveBeenCalled()
