Skip to content

Commit

Permalink
テストを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
omochiumaiumai committed Oct 15, 2023
1 parent a4b9b33 commit 600bac3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/system/users_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -619,14 +619,14 @@ class UsersTest < ApplicationSystemTestCase
end

test 'show hibernation period in profile' do
travel_to Time.zone.local(2023, 10, 15) do
hibernation_period = 1383
visit_with_auth "/users/#{users(:kyuukai).id}", 'komagata'
assert_text '休会中'
assert_text "休会から#{hibernation_period}日目"
hibernated_user = users(:kyuukai)
user = users(:hatsuno)

travel_to hibernated_user.hibernated_at + 30.days do
visit_with_auth user_path(hibernated_user), 'komagata'
assert_text '休会中 / 休会から30日目'
end
visit_with_auth "/users/#{users(:hatsuno).id}", 'komagata'
assert_no_text '休会中'
assert_no_text '休会から'
visit_with_auth user_path(user), 'komagata'
assert_no_text '休会中 / 休会から'
end
end

0 comments on commit 600bac3

Please sign in to comment.