storetest

package
v0.0.0-...-6b2a69b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StoreTests

type StoreTests struct {
	suite.Suite
	StoreFactory func() accounts.Store
}

StoreTests is a testing suite which makes sure that a Store obeys the interface contract

func (*StoreTests) TestAuthenticateUnknownEmailReturnsError

func (suite *StoreTests) TestAuthenticateUnknownEmailReturnsError()

func (*StoreTests) TestDifferentAccountsAreIndependent

func (suite *StoreTests) TestDifferentAccountsAreIndependent()

func (*StoreTests) TestEmptyPasswordFailsBeforeInitialSet

func (suite *StoreTests) TestEmptyPasswordFailsBeforeInitialSet()

TestEmptyPasswordFailsBeforeInitialSet makes sure people can't log in with an empty password after they've created an account, but before setting it the first time.

func (*StoreTests) TestEmptyPasswordsRejected

func (suite *StoreTests) TestEmptyPasswordsRejected()

TestEmptyPasswordsRejected makes sure the user can't set their password to be empty.

func (*StoreTests) TestInvalidPasswordsRejected

func (suite *StoreTests) TestInvalidPasswordsRejected()

TestInvalidPasswordsRejected makes sure people can't log in with the wrong password.

func (*StoreTests) TestInvalidTokensRejected

func (suite *StoreTests) TestInvalidTokensRejected()

TestInvalidTokensRejected makes sure people can't set their password with the wrong reset token.

func (*StoreTests) TestNewUserFlow

func (suite *StoreTests) TestNewUserFlow()

TestNewUserFlow makes sure users can make a new account, set their password, and log in.

func (*StoreTests) TestOldPasswordStillWorksAfterResetRequested

func (suite *StoreTests) TestOldPasswordStillWorksAfterResetRequested()

TestOldPasswordStillWorksAfterResetRequested makes sure the user can still use their old password after a reset has been requested.

func (*StoreTests) TestResetPasswordInvalidatesOldOne

func (suite *StoreTests) TestResetPasswordInvalidatesOldOne()

TestResetPasswordInvalidatesOldOne makes sure the user's new password works, and the old password _doesn't_ work, after it's been reset.

func (*StoreTests) TestSecondResetTokenInvalidatesFirst

func (suite *StoreTests) TestSecondResetTokenInvalidatesFirst()

TestSecondResetTokenInvalidatesFirst makes sure that the first reset token is invalidated after a second one is requested

func (*StoreTests) TestSetPasswordUnknownEmailReturnsError

func (suite *StoreTests) TestSetPasswordUnknownEmailReturnsError()

func (*StoreTests) TestTokenBecomesInvalidAfterUse

func (suite *StoreTests) TestTokenBecomesInvalidAfterUse()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL