mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-21 17:46:48 +00:00
test: add test with changing address order
This commit is contained in:
@ -36,8 +36,8 @@ func (ctx *TestContext) GetTestAccount(bddUserID string) *accounts.TestAccount {
|
||||
return ctx.testAccounts.GetTestAccount(bddUserID)
|
||||
}
|
||||
|
||||
func (ctx *TestContext) GetTestAccountWithAddress(bddUserID, addressID string) *accounts.TestAccount {
|
||||
return ctx.testAccounts.GetTestAccountWithAddress(bddUserID, addressID)
|
||||
func (ctx *TestContext) GetTestAccountWithAddress(bddUserID, bddAddressID string) *accounts.TestAccount {
|
||||
return ctx.testAccounts.GetTestAccountWithAddress(bddUserID, bddAddressID)
|
||||
}
|
||||
|
||||
func (ctx *TestContext) EnsureAddressID(bddUserID, addressOrAddressTestID string) string {
|
||||
@ -55,3 +55,9 @@ func (ctx *TestContext) EnsureAddress(bddUserID, addressOrAddressTestID string)
|
||||
}
|
||||
return account.EnsureAddress(addressOrAddressTestID)
|
||||
}
|
||||
|
||||
func (ctx *TestContext) ReorderAddresses(userID, addressA, addressB string) {
|
||||
addresses := ctx.testAccounts.Addresses[userID]
|
||||
|
||||
addresses[addressA], addresses[addressB] = addresses[addressB], addresses[addressA]
|
||||
}
|
||||
|
||||
@ -33,6 +33,7 @@ type PMAPIController interface {
|
||||
GetLabelIDs(username string, labelNames []string) ([]string, error)
|
||||
AddUserMessage(username string, message *pmapi.Message) error
|
||||
GetMessageID(username, messageIndex string) string
|
||||
ReorderAddresses(user *pmapi.User, addressIDs []string) error
|
||||
PrintCalls()
|
||||
WasCalled(method, path string, expectedRequest []byte) bool
|
||||
GetCalls(method, path string) [][]byte
|
||||
|
||||
Reference in New Issue
Block a user