From 9860b0c19e946ad8c68a514e57df64fc1daaed84 Mon Sep 17 00:00:00 2001 From: rigolden Date: Mon, 27 Jul 2020 12:16:54 -0300 Subject: [PATCH] fix: project api tests --- default_api_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/default_api_test.go b/default_api_test.go index 125b03f..cdb2e11 100644 --- a/default_api_test.go +++ b/default_api_test.go @@ -772,6 +772,7 @@ func TestDefaultApiService_CreateProject(t *testing.T) { client *APIClient } type args struct { + body interface{} } tests := []struct { name string @@ -780,7 +781,7 @@ func TestDefaultApiService_CreateProject(t *testing.T) { want *APIResponse wantErr, integrationTest bool }{ - {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects: context canceled"}, true, false}, + {"networkErrorContextExceeded", fields{client: generateConfigFake()}, args{struct{}{}}, &APIResponse{Message: "Post https://stash.domain.com/rest/api/1.0/projects: context canceled"}, true, false}, } for _, tt := range tests { if tt.integrationTest != runIntegrationTests { @@ -790,7 +791,7 @@ func TestDefaultApiService_CreateProject(t *testing.T) { a := &DefaultApiService{ client: tt.fields.client, } - got, err := a.CreateProject() + got, err := a.CreateProject(tt.args.body) if (err != nil) != tt.wantErr { t.Errorf("DefaultApiService.CreateProject() error = %v, wantErr %v", err, tt.wantErr) return @@ -8071,7 +8072,7 @@ func TestDefaultApiService_SearchCode(t *testing.T) { }, }, false, - false, + true, }, } for _, tt := range tests {