Skip to content

test(notifications): cover default leaving soon email template rendering - #281

Open
rfsbraz wants to merge 2 commits into
mainfrom
fix/email-default-template
Open

test(notifications): cover default leaving soon email template rendering#281
rfsbraz wants to merge 2 commits into
mainfrom
fix/email-default-template

Conversation

@rfsbraz

@rfsbraz rfsbraz commented Jun 12, 2026

Copy link
Copy Markdown
Owner
  • The reported bug (missing default email template) turned out to be invalid: DEFAULT_TEMPLATE_PATH resolves to app/templates/leaving_soon.html, which exists on main, ships in the Docker image via COPY ./app /app/app, and renders correctly with the provider's context.
  • The real gap was test coverage: nothing guarded against the template going missing or breaking, which would make every email silently fall back to the built-in HTML with only a warning log.
  • Adds regression tests asserting the default template exists and renders through _render_leaving_soon_template with full and minimal context (items, deletion date, Plex/Seerr links, totals).

@github-actions

Copy link
Copy Markdown
Contributor

🐳 To test this PR, build and run directly from the branch:

Using docker compose:

services:
  deleterr:
    build: https://github.com/rfsbraz/deleterr.git#refs/pull/281/head
    volumes:
      - ./config:/config
    environment:
      LOG_LEVEL: DEBUG

Using docker build:

docker build https://github.com/rfsbraz/deleterr.git#refs/pull/281/head -t deleterr:pr-281
docker run --rm -v ./config:/config -e LOG_LEVEL=DEBUG deleterr:pr-281

@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant