(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestBitbucketProviderOverrides(t *testing.T) { |
| 88 | p := NewBitbucketProvider( |
| 89 | &ProviderData{ |
| 90 | LoginURL: &url.URL{ |
| 91 | Scheme: "https", |
| 92 | Host: "example.com", |
| 93 | Path: "/oauth/auth"}, |
| 94 | RedeemURL: &url.URL{ |
| 95 | Scheme: "https", |
| 96 | Host: "example.com", |
| 97 | Path: "/oauth/token"}, |
| 98 | ValidateURL: &url.URL{ |
| 99 | Scheme: "https", |
| 100 | Host: "example.com", |
| 101 | Path: "/api/v3/user"}, |
| 102 | Scope: "profile"}, |
| 103 | options.BitbucketOptions{}) |
| 104 | assert.NotEqual(t, nil, p) |
| 105 | assert.Equal(t, "Bitbucket", p.Data().ProviderName) |
| 106 | assert.Equal(t, "https://example.com/oauth/auth", |
| 107 | p.Data().LoginURL.String()) |
| 108 | assert.Equal(t, "https://example.com/oauth/token", |
| 109 | p.Data().RedeemURL.String()) |
| 110 | assert.Equal(t, "https://example.com/api/v3/user", |
| 111 | p.Data().ValidateURL.String()) |
| 112 | assert.Equal(t, "profile", p.Data().Scope) |
| 113 | } |
| 114 | |
| 115 | func TestBitbucketProviderGetEmailAddress(t *testing.T) { |
| 116 | b := testBitbucketBackend("{\"values\": [ { \"email\": \"michael.bland@gsa.gov\", \"is_primary\": true } ] }") |
nothing calls this directly
no test coverage detected