Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iHiD committed Jan 13, 2025
1 parent 8983ae3 commit 0e9b6f0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion test/commands/bootcamp/solution/create_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Bootcamp::Solution::CreateTest < ActiveSupport::TestCase
create(:bootcamp_user_project, user:, project:)
exercise = create(:bootcamp_exercise, project:)

Bootcamp::UserProject.any_instance.expects(:exercise_available?).with(exercise).returns(false)
Bootcamp::Exercise::AvailableForUser.expects(:call).with(exercise, user).returns(false)

assert_raises ExerciseLockedError do
Bootcamp::Solution::Create.(user, exercise)
Expand Down
2 changes: 0 additions & 2 deletions test/controllers/api/bootcamp/solutions_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class API::Bootcamp::SolutionsControllerTest < API::BaseTestCase
solution = create(:bootcamp_solution, user:)
create :bootcamp_user_project, user:, project: solution.project

Bootcamp::Solution::Complete.expects(:call).with(solution)

setup_user(user)
patch complete_api_bootcamp_solution_url(solution), headers: @headers

Expand Down

0 comments on commit 0e9b6f0

Please sign in to comment.