summaryrefslogtreecommitdiff
path: root/internal/api/client/auth/auth_test.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2021-09-03 10:27:40 +0100
committerLibravatar GitHub <noreply@github.com>2021-09-03 10:27:40 +0100
commit25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687 (patch)
treeb6cffb65d46a07f59d5393a257973910d4116227 /internal/api/client/auth/auth_test.go
parentsession name fix (#185) (diff)
parentreview changes (diff)
downloadgotosocial-25edd57eaf3eecf0b449a4dabb5b5fc5d6ae7687.tar.xz
Merge pull request #186 from superseriousbusiness/struct_validation
Struct validation
Diffstat (limited to 'internal/api/client/auth/auth_test.go')
-rw-r--r--internal/api/client/auth/auth_test.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/api/client/auth/auth_test.go b/internal/api/client/auth/auth_test.go
index 3d5170f31..295c0e964 100644
--- a/internal/api/client/auth/auth_test.go
+++ b/internal/api/client/auth/auth_test.go
@@ -41,7 +41,7 @@ type AuthTestSuite struct {
testAccount *gtsmodel.Account
testApplication *gtsmodel.Application
testUser *gtsmodel.User
- testClient *oauth.Client
+ testClient *gtsmodel.Client
config *config.Config
}
@@ -83,7 +83,7 @@ func (suite *AuthTestSuite) SetupSuite() {
Email: "user@example.org",
AccountID: acctID,
}
- suite.testClient = &oauth.Client{
+ suite.testClient = &gtsmodel.Client{
ID: "a-known-client-id",
Secret: "some-secret",
Domain: fmt.Sprintf("%s://%s", c.Protocol, c.Host),
@@ -95,7 +95,6 @@ func (suite *AuthTestSuite) SetupSuite() {
ClientID: "a-known-client-id",
ClientSecret: "some-secret",
Scopes: "read",
- VapidKey: uuid.NewString(),
}
}
@@ -112,8 +111,8 @@ func (suite *AuthTestSuite) SetupTest() {
suite.db = db
models := []interface{}{
- &oauth.Client{},
- &oauth.Token{},
+ &gtsmodel.Client{},
+ &gtsmodel.Token{},
&gtsmodel.User{},
&gtsmodel.Account{},
&gtsmodel.Application{},
@@ -145,8 +144,8 @@ func (suite *AuthTestSuite) SetupTest() {
// TearDownTest drops the oauth_clients table and closes the pg connection after each test
func (suite *AuthTestSuite) TearDownTest() {
models := []interface{}{
- &oauth.Client{},
- &oauth.Token{},
+ &gtsmodel.Client{},
+ &gtsmodel.Token{},
&gtsmodel.User{},
&gtsmodel.Account{},
&gtsmodel.Application{},