Skip to content

[BE-141] locations module test coverage is a single happy-path smoke test #1283

Description

@yusuftomilola

Overview

The only test touching LocationsService is one it() block inside the misplaced root-level backend/src/femaleotaku.spec.ts ("LocationsService creates location"), covering just the create path with a fully mocked repository and no assertions on error handling, hierarchy behavior, or the location→asset-count relationship the service is documented to expose.

Tasks

  • Move location coverage into backend/src/locations/locations.service.spec.ts, co-located with the module.
  • Add tests for findById not-found, and for whatever hierarchical (parent/child) logic LocationsService implements.
  • Add a test for the per-location asset-count behavior referenced in the existing stray test's mock (mockAssetRepo).

Acceptance Criteria

  • Locations has real, co-located test coverage beyond the single existing happy-path create test.
  • The stray root-level test for this module is removed once superseded.

Notes for Contributors

Comment below to be assigned.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendtestingTests, QA, and quality assurance

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions