package points import "testing" func TestCentsToPoints_DefaultRate(t *testing.T) { if got := CentsToPoints(12345, 1); got != 12345 { t.Fatalf("expected 12345, got %d", got) } } func TestPointsToCents_DefaultRate(t *testing.T) { if got := PointsToCents(100, 1); got != 100 { t.Fatalf("expected 100, got %d", got) } } func TestRefundPointsAmount(t *testing.T) { pts := RefundPointsAmount(5000, 2500, 10000, 1) if pts != 12 { t.Fatalf("expected 12, got %d", pts) } }