Skip to content

Commit

Permalink
不要なテストケースの削除
Browse files Browse the repository at this point in the history
  • Loading branch information
Takuya-Sakai91 committed Apr 8, 2024
1 parent 379f723 commit c27dc5e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/models/times_channel_creator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class TimesChannelCreatorTest < ActiveSupport::TestCase
TimesChannelCreator.new.call({ user: })
end
assert_nil user.discord_profile.times_id
assert_nil user.discord_profile.times_url
assert_equal "[Discord API] #{user.login_name}の分報チャンネルが作成できませんでした。", logs.pop

Discord::TimesChannel.stub(:new, ->(_) { ValidTimesChannel.new }) do
Expand Down Expand Up @@ -48,16 +49,6 @@ class TimesChannelCreatorTest < ActiveSupport::TestCase
assert_not user.student_or_trainee?
end

test '#call creates times_url' do
user = users(:hajime)
assert_nil user.discord_profile.times_id
assert_nil user.discord_profile.times_url

Discord::TimesChannel.stub(:new, ->(_) { ValidTimesChannel.new }) do
TimesChannelCreator.new.call({ user: })
end
end

class ValidTimesChannel
def save
true
Expand Down

0 comments on commit c27dc5e

Please sign in to comment.