Skip to content

[5.3] Integration tests: 3 end-to-end test scenarios #7

@lomartins

Description

@lomartins

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

  1. Create a user + account
  2. POST a transaction with amount: "50.00"
  3. GET the account
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions