From 74f6ec8aed064029a1d53110190e0f6956ee6885 Mon Sep 17 00:00:00 2001 From: Prafulla Mahindrakar Date: Sat, 17 Apr 2021 19:39:57 +0530 Subject: [PATCH] Fixed unit test Signed-off-by: Prafulla Mahindrakar --- cmd/update/project_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/update/project_test.go b/cmd/update/project_test.go index 8e1df08c..a3e7d9e2 100644 --- a/cmd/update/project_test.go +++ b/cmd/update/project_test.go @@ -84,7 +84,7 @@ func TestActivateProjectFuncWithError(t *testing.T) { modifyProjectFlags(&(projectConfig.ArchiveProject), false, &(projectConfig.ActivateProject), true) mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err := updateProjectsFunc(ctx, args, cmdCtx) - assert.Nil(t, err) + assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) } @@ -112,7 +112,7 @@ func TestArchiveProjectFuncWithError(t *testing.T) { } mockClient.OnUpdateProjectMatch(ctx, projectUpdateRequest).Return(nil, errors.New("Error Updating Project")) err := updateProjectsFunc(ctx, args, cmdCtx) - assert.Nil(t, err) + assert.NotNil(t, err) mockClient.AssertCalled(t, "UpdateProject", ctx, projectUpdateRequest) }