Skip to content

Testing foundation: add unit tests for models + core controllers (initial suite) #30

Description

@syed-reza98

Why

Docs report 0% test coverage; this blocks safe iteration.

Scope (initial)

  • Model JSON roundtrip tests
  • Controller state transition tests for critical flows

Tasks

  • Add test/ structure (models/controllers)
  • Add baseline tests:
    • PetModel, UserModel, PostModel, OrderModel JSON parse/serialize
    • AuthNotifier login/register error paths (mock repo)
    • CartController persistence (after cart persistence issue is implemented)
  • Add CI workflow to run flutter test

Acceptance criteria

  • flutter test runs in CI
  • Core models covered with JSON tests
  • At least one controller covered with state transition test

References

  • docs/01_CODEBASE_ARCHITECTURE_REVIEW.md: Test Coverage 0/10
  • docs/02_FEATURES_REQUIREMENTS_BEST_PRACTICES.md: Testing Strategy + CI blueprint

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions