(hostname string)
| 10 | const formatJSON = "format=json" |
| 11 | |
| 12 | func 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 | |
| 30 | func TestNextcloudProviderDefaults(t *testing.T) { |
| 31 | p := testNextcloudProvider("") |
no test coverage detected