Update tests

This commit is contained in:
Lakhan Samani 2022-01-08 18:16:26 +05:30
parent 37fe5071c5
commit b3c7f783ed
2 changed files with 6 additions and 3 deletions

View File

@ -3,8 +3,9 @@ DATABASE_URL=data.db
DATABASE_TYPE=sqlite DATABASE_TYPE=sqlite
ADMIN_SECRET=admin ADMIN_SECRET=admin
JWT_SECRET=random_string JWT_SECRET=random_string
SENDER_EMAIL=username SENDER_EMAIL=info@authorizer.dev
SENDER_PASSWORD=password SMTP_USERNAME=username
SMTP_PASSWORD=password
SMTP_HOST=smtp.mailtrap.io SMTP_HOST=smtp.mailtrap.io
SMTP_PORT=2525 SMTP_PORT=2525
JWT_TYPE=HS256 JWT_TYPE=HS256

View File

@ -2,8 +2,10 @@ package test
import ( import (
"context" "context"
"fmt"
"net/http" "net/http"
"net/http/httptest" "net/http/httptest"
"time"
"github.com/authorizerdev/authorizer/server/constants" "github.com/authorizerdev/authorizer/server/constants"
"github.com/authorizerdev/authorizer/server/db" "github.com/authorizerdev/authorizer/server/db"
@ -66,7 +68,7 @@ func createContext(s TestSetup) (*http.Request, context.Context) {
func testSetup() TestSetup { func testSetup() TestSetup {
testData := TestData{ testData := TestData{
Email: "authorizer_tester@yopmail.com", Email: fmt.Sprintf("%d_authorizer_tester@yopmail.com", time.Now().Unix()),
Password: "test", Password: "test",
} }