diff options
Diffstat (limited to 'internal/db/bundb/account_test.go')
-rw-r--r-- | internal/db/bundb/account_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/db/bundb/account_test.go b/internal/db/bundb/account_test.go index 50603623f..bf85f14f4 100644 --- a/internal/db/bundb/account_test.go +++ b/internal/db/bundb/account_test.go @@ -22,6 +22,7 @@ import ( "context" "crypto/rand" "crypto/rsa" + "strings" "testing" "time" @@ -84,6 +85,22 @@ func (suite *AccountTestSuite) TestGetAccountByUsernameDomain() { suite.NotNil(account2) } +func (suite *AccountTestSuite) TestGetAccountByUsernameDomainMixedCase() { + testAccount := suite.testAccounts["remote_account_2"] + + account1, err := suite.db.GetAccountByUsernameDomain(context.Background(), testAccount.Username, testAccount.Domain) + suite.NoError(err) + suite.NotNil(account1) + + account2, err := suite.db.GetAccountByUsernameDomain(context.Background(), strings.ToUpper(testAccount.Username), testAccount.Domain) + suite.NoError(err) + suite.NotNil(account2) + + account3, err := suite.db.GetAccountByUsernameDomain(context.Background(), strings.ToLower(testAccount.Username), testAccount.Domain) + suite.NoError(err) + suite.NotNil(account3) +} + func (suite *AccountTestSuite) TestUpdateAccount() { ctx := context.Background() |