aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/api/projecthandler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/api/projecthandler_test.go')
-rw-r--r--src/orchestrator/api/projecthandler_test.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/orchestrator/api/projecthandler_test.go b/src/orchestrator/api/projecthandler_test.go
index 5e88bab9..639a2661 100644
--- a/src/orchestrator/api/projecthandler_test.go
+++ b/src/orchestrator/api/projecthandler_test.go
@@ -323,11 +323,23 @@ func TestProjectDeleteHandler(t *testing.T) {
label: "Delete Project",
expectedCode: http.StatusNoContent,
name: "testProject",
- projectClient: &mockProjectManager{},
+ projectClient: &mockProjectManager{
+ //Items that will be returned by the mocked Client
+ Items: []moduleLib.Project{
+ {
+ MetaData: moduleLib.ProjectMetaData{
+ Name: "testProject",
+ Description: "Test Project used for unit testing",
+ UserData1: "data1",
+ UserData2: "data2",
+ },
+ },
+ },
+ },
},
{
label: "Delete Non-Exiting Project",
- expectedCode: http.StatusInternalServerError,
+ expectedCode: http.StatusNotFound,
name: "testProject",
projectClient: &mockProjectManager{
Err: pkgerrors.New("Internal Error"),