From 1fef870916386cbf65629960864a799a742e7be6 Mon Sep 17 00:00:00 2001 From: Ariel Deitcher Date: Wed, 30 Aug 2023 09:55:58 -0700 Subject: [PATCH] fix tests --- pkg/cmd/project/shared/format/json_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/project/shared/format/json_test.go b/pkg/cmd/project/shared/format/json_test.go index c05a3e5ff..9e75167c5 100644 --- a/pkg/cmd/project/shared/format/json_test.go +++ b/pkg/cmd/project/shared/format/json_test.go @@ -25,7 +25,7 @@ func TestJSONProject_User(t *testing.T) { b, err := JSONProject(project) assert.NoError(t, err) - assert.Equal(t, `{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"User","login":"monalisa"}}`, string(b)) + assert.Equal(t, `{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"template":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"User","login":"monalisa"}}`, string(b)) } func TestJSONProject_Org(t *testing.T) { @@ -36,6 +36,7 @@ func TestJSONProject_Org(t *testing.T) { ShortDescription: "short description", Public: true, Readme: "readme", + Template: true, } project.Items.TotalCount = 1 @@ -45,7 +46,7 @@ func TestJSONProject_Org(t *testing.T) { b, err := JSONProject(project) assert.NoError(t, err) - assert.Equal(t, `{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"Organization","login":"github"}}`, string(b)) + assert.Equal(t, `{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"template":true,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"Organization","login":"github"}}`, string(b)) } func TestJSONProjects(t *testing.T) { @@ -70,6 +71,7 @@ func TestJSONProjects(t *testing.T) { ShortDescription: "short description", Public: true, Readme: "readme", + Template: true, } orgProject.Items.TotalCount = 1 @@ -81,7 +83,7 @@ func TestJSONProjects(t *testing.T) { assert.Equal( t, - `{"projects":[{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"User","login":"monalisa"}},{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"Organization","login":"github"}}],"totalCount":2}`, + `{"projects":[{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"template":false,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"User","login":"monalisa"}},{"number":2,"url":"a url","shortDescription":"short description","public":true,"closed":false,"template":true,"title":"","id":"123","readme":"readme","items":{"totalCount":1},"fields":{"totalCount":2},"owner":{"type":"Organization","login":"github"}}],"totalCount":2}`, string(b)) }