package app import ( "testing" "github.com/stretchr/testify/assert" ) func TestGetFeedBackRepo(t *testing.T) { tests := []struct { repo string feedbackRepo string }{ {"cool/git-cnb", "cool/feedback"}, {"cool/cnb/git-cnb", "cool/cnb/feedback"}, } for _, test := range tests { t.Run(test.repo, func(t *testing.T) { feedbackRepo := getFeedBackRepo(test.repo) assert.Equal(t, test.feedbackRepo, feedbackRepo, "Expected feedback repo %s, but got %s for repo: %s", test.feedbackRepo, feedbackRepo, test.repo) }) } }