Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
docs: known bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
bbortt committed Jun 30, 2024
1 parent d80743c commit 76b4e31
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
46 changes: 46 additions & 0 deletions spec/Bugs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# List of Bugs

## Known Bugs

These bugs have already been in the application/code since the beginning of the challenge. They should probably be well
known by now.

- [Wrong Response Code](#wrong-response-code)
- [Accounts cannot be deleted](#accounts-cannot-be-deleted)
- [Invalid Registration Validation](#invalid-registration-validation)

### Wrong Response Code

This bug is related to any endpoint specifying a success response code other than HTTP 200 (
see [`openapi.yml`](../src/main/resources/openapi/openapi.yml)).

**Current (falsy) behavior**: The endpoint does always return an HTTP 200 response code.

**Expected (true) behavior**: The endpoint returns the specified success response code.

This bug has also been depicted in
the [`AccountsResourceTest`](../src/test/java/ch/postfinance/swiss/hacks/resource/AccountsResourceTest.java).

### Accounts cannot be deleted

This bug is related to "User Story 5: Delete account" and the `DELETE /accounts/{iban}` endpoint.

**Current (falsy) behavior**: When I delete an account and transfer the remaining money to another one, the deleted
account vanishes.

**Expected (true) behavior**: The remaining money will be added to the transfer account, but the original account will
_not_ be deleted.

Basically, with this bug, you can stack your money endlessly.

### Invalid Registration Validation

This bug is related to "User Story 1: Customer Registration" and the `POST /customers/register` endpoint.

**Current (falsy) behavior**: The backend does not validate the inputs from the API, it just suspects that all
parameters are present. That results in an internal server error and an HTTP 500 response code, if one is not present.

**Expected (true) behavior**: Invalid input results in an HTTP 400 response code.

There has been a `TODO` in the [`LoginService`](../src/main/java/ch/postfinance/swiss/hacks/service/LoginService.java)
that stated out the missing implementation.
2 changes: 1 addition & 1 deletion spec/Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ As a customer, I want to be able to add a new account, so I can have accounts fo
- **And** open a new account
- **Then** A new account with 0 balance will be related to my login

## TODO: User Story 5: Delete account
## User Story 5: Delete account
As a customer, I want to be able to delete any of my accounts, so I can keep a purposeful portfolio.

### Scenario:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ch.postfinance.swiss.hacks.service;
package ch.postfinance.swiss.hacks.resource;

import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
Expand All @@ -11,7 +11,7 @@
import static org.hamcrest.Matchers.notNullValue;

@QuarkusTest
public class CustomerApiTest {
public class AccountsResourceTest {

@Test
public void testSuccessfulRegistration() {
Expand Down

0 comments on commit 76b4e31

Please sign in to comment.