Skip to content

Commit

Permalink
当日開催で終了済みイベントを非表示にした変更に伴い既存のシステムテストで設定していた時間を2時間過去にした
Browse files Browse the repository at this point in the history
  • Loading branch information
sugiwe committed Jan 19, 2025
1 parent 7a5cc91 commit ed505b9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/models/event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class EventTest < ActiveSupport::TestCase
test '.scheduled_on(date)' do
travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do
travel_to Time.zone.local(2017, 4, 3, 8, 0, 0) do
today_date = Time.zone.today
today_events_count = 2
today_events = Event.scheduled_on(today_date)
Expand Down
2 changes: 1 addition & 1 deletion test/models/upcoming_event_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class UpcomingEventTest < ActiveSupport::TestCase

# not testing '.build_group' because this method is used in '.upcoming_events_grpups'.
test '.upcoming_events_groups' do
travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do
travel_to Time.zone.local(2017, 4, 3, 8, 0, 0) do
today_events = [
events(:event27),
events(:event33),
Expand Down
2 changes: 1 addition & 1 deletion test/system/events_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ class EventsTest < ApplicationSystemTestCase
today_events_count = 5
tomorrow_events_count = 2
day_after_tomorrow_events_count = 4
travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do
travel_to Time.zone.local(2017, 4, 3, 8, 0, 0) do
visit_with_auth events_path, 'komagata'
within('.upcoming_events_groups') do
assert_text '近日開催のイベント'
Expand Down
2 changes: 1 addition & 1 deletion test/system/home_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class HomeTest < ApplicationSystemTestCase
end

test 'show all regular events and special events on dashbord' do
travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do
travel_to Time.zone.local(2017, 4, 3, 8, 0, 0) do
visit_with_auth '/', 'kimura'
today_event_label = find('.card-list__label', text: '今日開催')
tomorrow_event_label = find('.card-list__label', text: '明日開催')
Expand Down
2 changes: 1 addition & 1 deletion test/system/regular_events_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class RegularEventsTest < ApplicationSystemTestCase
today_events_count = 5
tomorrow_events_count = 2
day_after_tomorrow_events_count = 4
travel_to Time.zone.local(2017, 4, 3, 10, 0, 0) do
travel_to Time.zone.local(2017, 4, 3, 8, 0, 0) do
visit_with_auth events_path, 'komagata'
within('.upcoming_events_groups') do
assert_text '近日開催のイベント'
Expand Down

0 comments on commit ed505b9

Please sign in to comment.