Skip to content

Commit

Permalink
chore: unit tests for options
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Stockton committed Jan 22, 2025
1 parent 3746f70 commit be8f71e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions internal/api/options_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package api

import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/supabase/auth/internal/conf"
)

func TestNewLimiterOptions(t *testing.T) {
cfg := &conf.GlobalConfiguration{}
cfg.ApplyDefaults()

rl := NewLimiterOptions(cfg)
assert.NotNil(t, rl.Email)
assert.NotNil(t, rl.Phone)
assert.NotNil(t, rl.Signups)
assert.NotNil(t, rl.AnonymousSignIns)
assert.NotNil(t, rl.Recover)
assert.NotNil(t, rl.Resend)
assert.NotNil(t, rl.MagicLink)
assert.NotNil(t, rl.Otp)
assert.NotNil(t, rl.Token)
assert.NotNil(t, rl.Verify)
assert.NotNil(t, rl.User)
assert.NotNil(t, rl.FactorVerify)
assert.NotNil(t, rl.FactorChallenge)
assert.NotNil(t, rl.SSO)
assert.NotNil(t, rl.SAMLAssertion)
}

0 comments on commit be8f71e

Please sign in to comment.