MCPcopy
hub / github.com/cli/cli / Verify

Method Verify

internal/browser/stub.go:24–40  ·  view source on GitHub ↗
(t _testing, url string)

Source from the content-addressed store, hash-verified

22}
23
24func (b *Stub) Verify(t _testing, url string) {
25 t.Helper()
26 if url != "" {
27 switch len(b.urls) {
28 case 0:
29 t.Errorf("expected browser to open URL %q, but it was never invoked", url)
30 case 1:
31 if url != b.urls[0] {
32 t.Errorf("expected browser to open URL %q, got %q", url, b.urls[0])
33 }
34 default:
35 t.Errorf("expected browser to open one URL, but was invoked %d times", len(b.urls))
36 }
37 } else if len(b.urls) > 0 {
38 t.Errorf("expected no browser to open, but was invoked %d times: %v", len(b.urls), b.urls)
39 }
40}

Callers 15

TestViewRunFunction · 0.95
TestListRunFunction · 0.95
Test_viewRunFunction · 0.95
Test_listRunFunction · 0.95
Test_checkRunFunction · 0.95
Test_listRunFunction · 0.95
TestCodeRunFunction · 0.95
TestIssueView_webFunction · 0.95
TestIssueList_webFunction · 0.95
Test_createRunFunction · 0.95
Test_runBrowseFunction · 0.95
Test_createRunFunction · 0.95

Calls 2

HelperMethod · 0.65
ErrorfMethod · 0.65

Tested by 15

TestViewRunFunction · 0.76
TestListRunFunction · 0.76
Test_viewRunFunction · 0.76
Test_listRunFunction · 0.76
Test_checkRunFunction · 0.76
Test_listRunFunction · 0.76
TestCodeRunFunction · 0.76
TestIssueView_webFunction · 0.76
TestIssueList_webFunction · 0.76
Test_createRunFunction · 0.76
Test_runBrowseFunction · 0.76
Test_createRunFunction · 0.76