test(components): 🧪 password change

master
Xeronith 2023-06-05 11:30:06 +03:30
rodzic 03f12913da
commit 4aa1a79b64
2 zmienionych plików z 24 dodań i 0 usunięć

Wyświetl plik

@ -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) {
input := &LogoutRequest{}

Wyświetl plik

@ -226,6 +226,17 @@ func TestSpiManager_UpdateProfileByUser(test *testing.T) {
_ = 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) {
manager := Conductor.SpiManager()