mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 10:29:35 +08:00
41e19adb0d
We don't actually use the reminder_type for bookmarks anywhere;
we are just storing it. It has no bearing on the UI. It used
to be relevant with the at_desktop bookmark reminders (see
fa572d3a7a
)
This commit marks the column as readonly, ignores it, and removes
the index, and it will be dropped in a later PR. Some plugins
are relying on reminder_type partially so some stubs have been
left in place to avoid errors.
24 lines
528 B
Ruby
24 lines
528 B
Ruby
# frozen_string_literal: true
|
|
|
|
Fabricator(:bookmark) do
|
|
user
|
|
post { Fabricate(:post) }
|
|
name "This looked interesting"
|
|
reminder_at { 1.day.from_now.iso8601 }
|
|
reminder_set_at { Time.zone.now }
|
|
end
|
|
|
|
Fabricator(:bookmark_next_business_day_reminder, from: :bookmark) do
|
|
reminder_at do
|
|
date = if Time.zone.now.friday?
|
|
Time.zone.now + 3.days
|
|
elsif Time.zone.now.saturday?
|
|
Time.zone.now + 2.days
|
|
else
|
|
Time.zone.now + 1.day
|
|
end
|
|
date.iso8601
|
|
end
|
|
reminder_set_at { Time.zone.now }
|
|
end
|