()
| 76 | } |
| 77 | |
| 78 | func (m *MockOAuthDatastoreProvider) Config() *config.Config { |
| 79 | if m.DoConfig != nil { |
| 80 | return m.DoConfig() |
| 81 | } |
| 82 | cfg := config.New() |
| 83 | cfg.UseSQLite(true) |
| 84 | cfg.WriteAsOauth = config.WriteAsOauthCfg{ |
| 85 | ClientID: "development", |
| 86 | ClientSecret: "development", |
| 87 | AuthLocation: "https://write.as/oauth/login", |
| 88 | TokenLocation: "https://write.as/oauth/token", |
| 89 | InspectLocation: "https://write.as/oauth/inspect", |
| 90 | } |
| 91 | cfg.SlackOauth = config.SlackOauthCfg{ |
| 92 | ClientID: "development", |
| 93 | ClientSecret: "development", |
| 94 | TeamID: "development", |
| 95 | } |
| 96 | return cfg |
| 97 | } |
| 98 | |
| 99 | func (m *MockOAuthDatastore) ValidateOAuthState(ctx context.Context, state string) (string, string, int64, string, error) { |
| 100 | if m.DoValidateOAuthState != nil { |
no test coverage detected