MCPcopy Index your code
hub / github.com/1Password/for-open-source / TestApplication_FileName

Function TestApplication_FileName

script/application_test.go:160–185  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

158}
159
160func TestApplication_FileName(t *testing.T) {
161 testCases := []struct {
162 issueNumber int
163 projectName string
164 expectedFilename string
165 }{
166 {123, "Test project", "123-test-project.json"},
167 {456, "My_Team", "456-my_team.json"},
168 {789, "Event: Re/Act?", "789-event-react.json"},
169 {101, "Project--With---Dashes", "101-project-with-dashes.json"},
170 }
171
172 for _, tt := range testCases {
173 t.Run(tt.expectedFilename, func(t *testing.T) {
174 app := Application{
175 IssueNumber: tt.issueNumber,
176 Project: Project{Name: tt.projectName},
177 }
178
179 filename := app.FileName()
180 if filename != tt.expectedFilename {
181 t.Errorf("FileName() is %s, expected %v", filename, tt.expectedFilename)
182 }
183 })
184 }
185}
186
187func TestApplication_SetApprover(t *testing.T) {
188 cleanup, err := setupTestDir("../")

Callers

nothing calls this directly

Calls 1

FileNameMethod · 0.95

Tested by

no test coverage detected