Пример #1
0
			taskGuid      string
			cellId        string
			failed        bool
			failureReason string
			result        string
		)

		BeforeEach(func() {
			taskGuid = "t-guid"
			cellId = "c-id"
			failed = true
			failureReason = "some-error"
			result = "yeah"

			task := model_helpers.NewValidTask("hi-bob")
			fakeTaskDB.CompleteTaskReturns(task, nil)

			requestBody = &models.CompleteTaskRequest{
				TaskGuid:      taskGuid,
				CellId:        cellId,
				Failed:        failed,
				FailureReason: failureReason,
				Result:        result,
			}
		})

		JustBeforeEach(func() {
			request := newTestRequest(requestBody)
			handler.CompleteTask(responseRecorder, request)
		})