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

Function TestApplication_SetApprover

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

Source from the content-addressed store, hash-verified

185}
186
187func TestApplication_SetApprover(t *testing.T) {
188 cleanup, err := setupTestDir("../")
189 if err != nil {
190 t.Fatalf(err.Error())
191 }
192
193 defer cleanup()
194
195 setTestApplication("project")
196 app := Application{}
197
198 app.SetApprover()
199
200 if app.ApproverId != 123 {
201 t.Errorf("SetApprover() set ApproverId to %d, expected 123", app.ApproverId)
202 }
203
204 if app.ApproverUsername != "wendyappleseed" {
205 t.Errorf("SetApprover() set ApproverUsername to %s, expected wendyappleseed", app.ApproverUsername)
206 }
207}

Callers

nothing calls this directly

Calls 4

SetApproverMethod · 0.95
setupTestDirFunction · 0.85
setTestApplicationFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected