Skip to content

[Tests] Add missing test coverage for critical paths #55

@ibourgeois

Description

@ibourgeois

Missing Coverage

The following scenarios have no test coverage:

  1. Impersonation real session flow: existing test re-auths before DELETE, masking the escape-hatch bug. Need a test that mirrors what a browser session does.
  2. Double propose: calling POST /ideas/{idea}/propose twice should result in exactly one project, not two.
  3. Propose with null fields: an idea with null summary/details should not crash on propose.
  4. Unauthenticated redirects: no test verifies that /ideas, /notifications, and admin routes redirect unauthenticated users to /login.
  5. Idea user isolation: no test verifies a user cannot access another user's idea (edit, update, delete).
  6. Non-admin blocked from admin routes: GET /admin/users, GET /admin/users/{user}/edit, PUT /admin/users/{user}.
  7. Registration edge cases: duplicate email, missing required fields, password confirmation mismatch.

Files

  • tests/Feature/Admin/ImpersonationTest.php
  • tests/Feature/IdeaProposalTest.php (new)
  • tests/Feature/AuthRedirectTest.php (new)
  • tests/Feature/IdeaIsolationTest.php (new)
  • tests/Feature/Admin/UserControllerTest.php (new)
  • tests/Feature/Auth/RegistrationTest.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions