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
        103
         	vertokrepo := vertokrepo.New(e.postgresDB)

      
        104
        104
         	pwdtokrepo := passwordtokrepo.NewPasswordResetTokenRepo(e.postgresDB)

      
        105
        105
         

      
        106
        
        -	stubOAuthProvider := newOauthProviderMock()

      
        
        106
        +	stubOAuthProvider := newOauthProviderStub()

      
        107
        107
         

      
        108
        108
         	notecache := notecache.New(e.redisDB, cfg.CacheUsersTTL)

      
        109
        109
         	noterepo := noterepo.New(e.postgresDB)

      
M e2e/oauth_provider_mock_test.go
···
        6
        6
         	"github.com/olexsmir/onasty/internal/oauth"

      
        7
        7
         )

      
        8
        8
         

      
        9
        
        -var _ oauth.Provider = (*oauthProviderMock)(nil)

      
        
        9
        +var _ oauth.Provider = (*oauthProviderStub)(nil)

      
        10
        10
         

      
        11
        
        -type oauthProviderMock struct{}

      
        
        11
        +type oauthProviderStub struct{}

      
        12
        12
         

      
        13
        
        -func newOauthProviderMock() *oauthProviderMock {

      
        14
        
        -	return &oauthProviderMock{}

      
        
        13
        +func newOauthProviderStub() *oauthProviderStub {

      
        
        14
        +	return &oauthProviderStub{}

      
        15
        15
         }

      
        16
        16
         

      
        17
        
        -func (o *oauthProviderMock) GetAuthURL(_ string) string {

      
        
        17
        +func (o *oauthProviderStub) GetAuthURL(_ string) string {

      
        18
        18
         	return "https://example.com/oauth/authorize"

      
        19
        19
         }

      
        20
        20
         

      
        21
        
        -func (o *oauthProviderMock) ExchangeCode(_ context.Context, _ string) (oauth.UserInfo, error) {

      
        
        21
        +func (o *oauthProviderStub) ExchangeCode(_ context.Context, _ string) (oauth.UserInfo, error) {

      
        22
        22
         	return oauth.UserInfo{

      
        23
        23
         		Provider:      "google",

      
        24
        24
         		ProviderID:    "1234567890",