aboutsummaryrefslogtreecommitdiff
path: root/internal/db/mocks.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/mocks.go')
-rw-r--r--internal/db/mocks.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/db/mocks.go b/internal/db/mocks.go
index 9b1e9028..06bafc75 100644
--- a/internal/db/mocks.go
+++ b/internal/db/mocks.go
@@ -180,9 +180,19 @@ func SetMockReposStore(t *testing.T, mock ReposStore) {
var _ TwoFactorsStore = (*MockTwoFactorsStore)(nil)
type MockTwoFactorsStore struct {
+ MockCreate func(userID int64, key, secret string) error
+ MockGetByUserID func(userID int64) (*TwoFactor, error)
MockIsUserEnabled func(userID int64) bool
}
+func (m *MockTwoFactorsStore) Create(userID int64, key, secret string) error {
+ return m.MockCreate(userID, key, secret)
+}
+
+func (m *MockTwoFactorsStore) GetByUserID(userID int64) (*TwoFactor, error) {
+ return m.MockGetByUserID(userID)
+}
+
func (m *MockTwoFactorsStore) IsUserEnabled(userID int64) bool {
return m.MockIsUserEnabled(userID)
}