package luckygift

import (
	"testing"
	"time"
)

func TestNormalizeOutboxRetentionOptionsFillsSafeDefaults(t *testing.T) {
	got := normalizeOutboxRetentionOptions(OutboxRetentionOptions{})
	want := defaultOutboxRetentionOptions()
	if got != want {
		t.Fatalf("normalizeOutboxRetentionOptions(zero) = %+v, want %+v", got, want)
	}

	custom := OutboxRetentionOptions{
		ScanInterval: time.Minute,
		MaxAge:       7 * 24 * time.Hour,
		BatchSize:    100,
	}
	if got := normalizeOutboxRetentionOptions(custom); got != custom {
		t.Fatalf("normalizeOutboxRetentionOptions(custom) = %+v, want unchanged %+v", got, custom)
	}
}
