Skip to content

Commit 63a587a

Browse files
committed
fixup for tests
Signed-off-by: Neil South <[email protected]>
1 parent d56f7fa commit 63a587a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/UnitTests/TaskManager.Argo.Tests/ArgoClientTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public async Task Argo_CreateWorkflowTemplateAsync()
224224
ArgoClient argoClient = new(httpclient);
225225

226226
var result = await argoClient.Argo_CreateWorkflowTemplateAsync("argo",
227-
new WorkflowTemplateCreateRequest { Namespace = "argo" },
227+
new WorkflowTemplateCreateRequest { Namespace = "argo", Template = new WorkflowTemplate() },
228228
CancellationToken.None);
229229

230230
Assert.NotNull(result);

tests/UnitTests/TaskManager.Argo.Tests/Controller/TemplateControllerTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,11 @@ public async Task DeleteArgoTemplate_Controller_ReturnsOk()
145145
_argoLogger.Object,
146146
Options);
147147

148+
ArgoClient.Setup(a => a.Argo_DeleteWorkflowTemplateAsync(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<CancellationToken>())).Returns(Task.FromResult(true));
149+
148150
var result = await TemplateController.DeleteArgoTemplate("template");
149151

150-
Assert.IsType<ActionResult<bool>>(result);
151-
var okResult = Assert.IsType<OkObjectResult>(result.Result);
152+
var okResult = Assert.IsType<OkResult>(result.Result);
152153
Assert.Equal((int)HttpStatusCode.OK, okResult.StatusCode);
153154
}
154155

0 commit comments

Comments
 (0)