MCPcopy
hub / github.com/oauth2-proxy/oauth2-proxy / testNextcloudProvider

Function testNextcloudProvider

providers/nextcloud_test.go:12–28  ·  view source on GitHub ↗
(hostname string)

Source from the content-addressed store, hash-verified

10const formatJSON = "format=json"
11
12func testNextcloudProvider(hostname string) *NextcloudProvider {
13 p := NewNextcloudProvider(
14 &ProviderData{
15 ProviderName: "",
16 LoginURL: &url.URL{},
17 RedeemURL: &url.URL{},
18 ProfileURL: &url.URL{},
19 ValidateURL: &url.URL{},
20 Scope: ""})
21 if hostname != "" {
22 updateURL(p.Data().LoginURL, hostname)
23 updateURL(p.Data().RedeemURL, hostname)
24 updateURL(p.Data().ProfileURL, hostname)
25 updateURL(p.Data().ValidateURL, hostname)
26 }
27 return p
28}
29
30func TestNextcloudProviderDefaults(t *testing.T) {
31 p := testNextcloudProvider("")

Callers 1

Calls 3

NewNextcloudProviderFunction · 0.85
updateURLFunction · 0.85
DataMethod · 0.65

Tested by

no test coverage detected