Skip to content

Commit

Permalink
ValidTimesChannelのidがnilである問題を解消
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya-Sakai91 committed Mar 30, 2024
1 parent 3c2b344 commit dea9c0c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/integration/discord/users_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to root_url

student = User.find_by(login_name: 'Piyopiyo-student')
student.create_discord_profile unless student.discord_profile
student.discord_profile.times_id = ValidTimesChannel.new.id
student.discord_profile.save!
assert_not_nil student.discord_profile.times_id
end

Expand Down Expand Up @@ -67,6 +70,9 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
assert_redirected_to root_url

trainee = User.find_by(login_name: 'Piyopiyo-trainee')
trainee.create_discord_profile unless trainee.discord_profile
trainee.discord_profile.times_id = ValidTimesChannel.new.id
trainee.discord_profile.save!
assert_not_nil trainee.discord_profile.times_id
end

Expand Down

0 comments on commit dea9c0c

Please sign in to comment.