Skip to content

Add unit tests for the invoice funding deadline validator rejecting deadlines in the past or under 24 hours away #179

Description

@Chucks1093

Summary

An invoice funding deadline must be at least 24 hours in the future at the time of publishing. The validator should reject deadlines that are in the past or within the 24-hour minimum window. Unit tests should cover boundary values around the cutoff.

Scope

  • Test a deadline exactly 24 hours from now passes validation
  • Test a deadline 23 hours and 59 minutes from now fails with deadline_too_soon
  • Test a deadline in the past fails with deadline_in_past
  • Test a deadline 7 days from now passes validation
  • Assert the validator uses the server clock and not a client-supplied timestamp

Acceptance Criteria

  • Deadline exactly 24h from now passes
  • Deadline under 24h from now fails with deadline_too_soon
  • Past deadline fails with deadline_in_past
  • Deadline 7 days out passes
  • Validator uses server clock

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions