public async Task RunSqlImportJobDelegatesToPublishingEndPointAndReturnsJobDetails() { string specificationId = NewRandomString(); string fundingStreamId = NewRandomString(); JobCreationResponse expectedJob = new JobCreationResponse(); _authorizationHelper.DoesUserHavePermission(Arg.Any <ClaimsPrincipal>(), specificationId, SpecificationActionTypes.CanRefreshPublishedQa) .Returns(Task.FromResult(true)); _publishingApiClient .QueueSpecificationFundingStreamSqlImport(specificationId, fundingStreamId) .Returns(new ApiResponse <JobCreationResponse>(HttpStatusCode.OK, expectedJob)); OkObjectResult result = await WhenTheRunSqlJobIsCreated(specificationId, fundingStreamId) as OkObjectResult; result? .Value .Should() .BeSameAs(expectedJob); }