Skip to content

Tests: notification pipeline (email + Prowl) is not tested end-to-end #53

@tkadauke

Description

@tkadauke

Description

The notification system sends emails and Prowl push notifications when health checks change state. While mailer unit tests exist (spec/mailers/check_run_mailer_spec.rb), the notifier orchestration (lib/tiny_mon/notifier.rb, lib/tiny_mon/notification/) is not tested.

Critical untested behaviors:

  • Is the notifier called after a check changes from success to failure?
  • Is it called after failure → success recovery?
  • Are notifications correctly scoped to account users who subscribed?
  • Does notification failure (e.g., Prowl API down) prevent check_run from being saved?

Suggested approach

Add spec/lib/tiny_mon/notifier_spec.rb and ensure the mailer is called with the right arguments for state transitions. Use ActionMailer::Base test helpers and mock the Prowl HTTP call.

Effort: small

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