Some improvements

- Fix issue with lunch flow accounts that were imported
- Remove the period comparison section from reports
This commit is contained in:
sokie
2025-11-11 09:42:59 +01:00
parent 7f5cf4c082
commit 1925b4ce39
7 changed files with 6 additions and 319 deletions

View File

@@ -45,25 +45,11 @@ class PeriodTest < ActiveSupport::TestCase
assert_equal "Custom Period", period.label
end
test "comparison_label returns correct label for known period" do
period = Period.from_key("last_30_days")
assert_equal "vs. last month", period.comparison_label
end
test "comparison_label returns date range for unknown period" do
start_date = Date.current - 15.days
end_date = Date.current
period = Period.new(start_date: start_date, end_date: end_date)
expected = "#{start_date.strftime("%b %d, %Y")} to #{end_date.strftime("%b %d, %Y")}"
assert_equal expected, period.comparison_label
end
test "all_time period can be created" do
period = Period.from_key("all_time")
assert_equal "all_time", period.key
assert_equal "All Time", period.label
assert_equal "All", period.label_short
assert_equal "vs. beginning", period.comparison_label
end
test "all_time period uses family's oldest entry date" do