diff --git a/app/commands/mentor/discussion/finish_by_student.rb b/app/commands/mentor/discussion/finish_by_student.rb index a801166292..24dc1c5bee 100644 --- a/app/commands/mentor/discussion/finish_by_student.rb +++ b/app/commands/mentor/discussion/finish_by_student.rb @@ -86,7 +86,7 @@ def award_badges! end def award_trophies! - AwardTrophyJob.perform_later(discussion.student, track, :general, :mentored) + AwardTrophyJob.perform_later(discussion.student, track, :mentored) end def update_roles! diff --git a/test/commands/user_track/acquired_trophy/create_test.rb b/test/commands/user_track/acquired_trophy/create_test.rb index d6135fbab4..d860e263e7 100644 --- a/test/commands/user_track/acquired_trophy/create_test.rb +++ b/test/commands/user_track/acquired_trophy/create_test.rb @@ -68,8 +68,8 @@ class UserTrack::AcquiredTrophy::CreateTest < ActiveSupport::TestCase Track::Trophies::MentoredTrophy.any_instance.stubs(notification_key:) User::Notification::Create.expects(:call).with do |actual_user, actual_slug, kwargs| assert_equal user, actual_user - assert_equal : acquired_trophy, actual_slug - assert_nil kwargs[: user_track_acquired_trophy] + assert_equal :acquired_trophy, actual_slug + refute_nil kwargs[:user_track_acquired_trophy] end UserTrack::AcquiredTrophy::Create.(user, track, :mentored) diff --git a/test/serializers/serialize_track_trophies_test.rb b/test/serializers/serialize_track_trophies_test.rb index 5eccd19518..c22a592564 100644 --- a/test/serializers/serialize_track_trophies_test.rb +++ b/test/serializers/serialize_track_trophies_test.rb @@ -72,7 +72,7 @@ class SerializeTrackTrophiesTest < ActiveSupport::TestCase } }, { - name: "Completionist", + name: "Exemplary Expert", criteria: "Awarded once you complete all exercises in Nim", success_message: "Congratulations on completing all exercises in Nim", icon_name: "trophy-completed-all-exercises", @@ -100,7 +100,7 @@ class SerializeTrackTrophiesTest < ActiveSupport::TestCase links: {} }, { - name: "Completionist", + name: "Exemplary Expert", criteria: "Awarded once you complete all exercises in Prolog", success_message: "Congratulations on completing all exercises in Prolog", icon_name: "trophy-completed-all-exercises", diff --git a/test/system/flows/user_views_dashboard_test.rb b/test/system/flows/user_views_dashboard_test.rb index 65bc65b615..518b65c408 100644 --- a/test/system/flows/user_views_dashboard_test.rb +++ b/test/system/flows/user_views_dashboard_test.rb @@ -61,8 +61,8 @@ class UserViewsDashboardTest < ApplicationSystemTestCase test "shows latest site updates for joined tracks" do user = create :user - joined_track = create :track, :random_slug - unjoined_track = create :track, :random_slug + joined_track = create :track, slug: 'ruby' + unjoined_track = create :track, slug: 'kotlin' create :user_track, user:, track: joined_track joined_arbitrary_update = create :arbitrary_site_update, title: "Arbitrary update 1", description_markdown: 'Such a cool update', track: joined_track, published_at: Time.current diff --git a/test/system/pages/tracks/show_joined_test.rb b/test/system/pages/tracks/show_joined_test.rb index 56b1b579c3..a52af17ccb 100644 --- a/test/system/pages/tracks/show_joined_test.rb +++ b/test/system/pages/tracks/show_joined_test.rb @@ -25,7 +25,7 @@ class ShowJoinedTest < ApplicationSystemTestCase end test "show joined on course-track in different states" do - track = create :track, slug: :ruby_1, title: "Ruby #{SecureRandom.hex}" + track = create :track, slug: "ruby", title: "Ruby #{SecureRandom.hex}" hello_world = create(:hello_world_exercise, track:) ce_1 = create :concept_exercise, track:, slug: 'movie' ce_2 = create :concept_exercise, track:, slug: 'lasa' @@ -65,7 +65,7 @@ class ShowJoinedTest < ApplicationSystemTestCase end test "show joined on non-course-track in different states" do - track = create :track, slug: :ruby_1, title: "Ruby #{SecureRandom.hex}" + track = create :track, slug: "ruby", title: "Ruby #{SecureRandom.hex}" hello_world = create(:hello_world_exercise, track:) pe_1 = create :practice_exercise, track:, slug: 'bob' create :practice_exercise, track:, slug: 'food'