Phase 5.3 — Integration tests (Medium)
Write 3 #[tokio::test] tests in backend/tests/integration_test.rs using the scaffolding Claude provides.
Test 1: test_create_user_and_get_it_back
POST a user, GET by id, assert the returned email matches.
Test 2: test_create_account_requires_valid_user
POST an account for a nonexistent user_id, assert the response status is 404.
Test 3: test_transaction_updates_account_balance
- Create a user + account
- POST a transaction with
amount: "50.00"
- GET the account
- Assert
balance == "50.00"
Prerequisite: Phase 5.2 integration test scaffolding must be complete (Claude task).
Done when: cargo test (with Docker running) — all tests pass.
Phase 5.3 — Integration tests (Medium)
Write 3
#[tokio::test]tests inbackend/tests/integration_test.rsusing the scaffolding Claude provides.Test 1: test_create_user_and_get_it_back
POST a user, GET by id, assert the returned email matches.
Test 2: test_create_account_requires_valid_user
POST an account for a nonexistent
user_id, assert the response status is 404.Test 3: test_transaction_updates_account_balance
amount: "50.00"balance == "50.00"Prerequisite: Phase 5.2 integration test scaffolding must be complete (Claude task).
Done when:
cargo test(with Docker running) — all tests pass.