all repos

onasty @ d631546

a one-time notes service
2 files changed, 7 insertions(+), 7 deletions(-)
refactor(e2e): name stubs as stubs (#163)

Author: Olexandr Smirnov ss2316544@gmail.com
Committed by: GitHub noreply@github.com
Committed at: 2025-07-08 20:05:23 +0300
Parent: 39d6b8e
M e2e/e2e_test.go

@@ -103,7 +103,7 @@ sessionrepo := sessionrepo.New(e.postgresDB)

vertokrepo := vertokrepo.New(e.postgresDB) pwdtokrepo := passwordtokrepo.NewPasswordResetTokenRepo(e.postgresDB) - stubOAuthProvider := newOauthProviderMock() + stubOAuthProvider := newOauthProviderStub() notecache := notecache.New(e.redisDB, cfg.CacheUsersTTL) noterepo := noterepo.New(e.postgresDB)
M e2e/oauth_provider_mock_test.go

@@ -6,19 +6,19 @@

"github.com/olexsmir/onasty/internal/oauth" ) -var _ oauth.Provider = (*oauthProviderMock)(nil) +var _ oauth.Provider = (*oauthProviderStub)(nil) -type oauthProviderMock struct{} +type oauthProviderStub struct{} -func newOauthProviderMock() *oauthProviderMock { - return &oauthProviderMock{} +func newOauthProviderStub() *oauthProviderStub { + return &oauthProviderStub{} } -func (o *oauthProviderMock) GetAuthURL(_ string) string { +func (o *oauthProviderStub) GetAuthURL(_ string) string { return "https://example.com/oauth/authorize" } -func (o *oauthProviderMock) ExchangeCode(_ context.Context, _ string) (oauth.UserInfo, error) { +func (o *oauthProviderStub) ExchangeCode(_ context.Context, _ string) (oauth.UserInfo, error) { return oauth.UserInfo{ Provider: "google", ProviderID: "1234567890",