kopia lustrzana https://github.com/reiver/greatape
test(components): 🧪 password change
rodzic
03f12913da
commit
4aa1a79b64
|
@ -124,6 +124,19 @@ func TestUpdateProfileByUserApi(test *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestChangePasswordApi(test *testing.T) {
|
||||||
|
input := &ChangePasswordRequest{
|
||||||
|
CurrentPassword: "current_password",
|
||||||
|
NewPassword: "new_password",
|
||||||
|
}
|
||||||
|
|
||||||
|
if output, err := api.ChangePassword(input); err != nil {
|
||||||
|
test.Fatal(err)
|
||||||
|
} else if output == nil {
|
||||||
|
test.Fail()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestLogoutApi(test *testing.T) {
|
func TestLogoutApi(test *testing.T) {
|
||||||
input := &LogoutRequest{}
|
input := &LogoutRequest{}
|
||||||
|
|
||||||
|
|
|
@ -226,6 +226,17 @@ func TestSpiManager_UpdateProfileByUser(test *testing.T) {
|
||||||
_ = result
|
_ = result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestSpiManager_ChangePassword(test *testing.T) {
|
||||||
|
manager := Conductor.SpiManager()
|
||||||
|
|
||||||
|
result, err := manager.ChangePassword("current_password", "new_password", nil)
|
||||||
|
if err != nil {
|
||||||
|
test.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
_ = result
|
||||||
|
}
|
||||||
|
|
||||||
func TestSpiManager_Logout(test *testing.T) {
|
func TestSpiManager_Logout(test *testing.T) {
|
||||||
manager := Conductor.SpiManager()
|
manager := Conductor.SpiManager()
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue