mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-07 09:09:30 -06:00
too many changes to name honestly
This commit is contained in:
parent
e6c590c065
commit
f210d39891
85 changed files with 1178 additions and 587 deletions
|
|
@ -29,7 +29,7 @@ import (
|
|||
"github.com/stretchr/testify/suite"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/config"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db/model"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/router"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
|
@ -39,9 +39,9 @@ type AuthTestSuite struct {
|
|||
suite.Suite
|
||||
oauthServer oauth.Server
|
||||
db db.DB
|
||||
testAccount *model.Account
|
||||
testApplication *model.Application
|
||||
testUser *model.User
|
||||
testAccount *gtsmodel.Account
|
||||
testApplication *gtsmodel.Application
|
||||
testUser *gtsmodel.User
|
||||
testClient *oauth.Client
|
||||
config *config.Config
|
||||
}
|
||||
|
|
@ -75,11 +75,11 @@ func (suite *AuthTestSuite) SetupSuite() {
|
|||
|
||||
acctID := uuid.NewString()
|
||||
|
||||
suite.testAccount = &model.Account{
|
||||
suite.testAccount = >smodel.Account{
|
||||
ID: acctID,
|
||||
Username: "test_user",
|
||||
}
|
||||
suite.testUser = &model.User{
|
||||
suite.testUser = >smodel.User{
|
||||
EncryptedPassword: string(encryptedPassword),
|
||||
Email: "user@example.org",
|
||||
AccountID: acctID,
|
||||
|
|
@ -89,7 +89,7 @@ func (suite *AuthTestSuite) SetupSuite() {
|
|||
Secret: "some-secret",
|
||||
Domain: fmt.Sprintf("%s://%s", c.Protocol, c.Host),
|
||||
}
|
||||
suite.testApplication = &model.Application{
|
||||
suite.testApplication = >smodel.Application{
|
||||
Name: "a test application",
|
||||
Website: "https://some-application-website.com",
|
||||
RedirectURI: "http://localhost:8080",
|
||||
|
|
@ -115,9 +115,9 @@ func (suite *AuthTestSuite) SetupTest() {
|
|||
models := []interface{}{
|
||||
&oauth.Client{},
|
||||
&oauth.Token{},
|
||||
&model.User{},
|
||||
&model.Account{},
|
||||
&model.Application{},
|
||||
>smodel.User{},
|
||||
>smodel.Account{},
|
||||
>smodel.Application{},
|
||||
}
|
||||
|
||||
for _, m := range models {
|
||||
|
|
@ -148,9 +148,9 @@ func (suite *AuthTestSuite) TearDownTest() {
|
|||
models := []interface{}{
|
||||
&oauth.Client{},
|
||||
&oauth.Token{},
|
||||
&model.User{},
|
||||
&model.Account{},
|
||||
&model.Application{},
|
||||
>smodel.User{},
|
||||
>smodel.Account{},
|
||||
>smodel.Application{},
|
||||
}
|
||||
for _, m := range models {
|
||||
if err := suite.db.DropTable(m); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue