mirror of
https://github.com/we-promise/sure.git
synced 2026-04-14 09:34:05 +00:00
Some improvements
- Fix issue with lunch flow accounts that were imported - Remove the period comparison section from reports
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user