Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Sep 18, 2023
1 parent 14c9cde commit 9577e01
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/controllers/annotations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def update

def destroy
@annotation.destroy
render status: :no_content
head :no_content
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/score_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def destroy
@score_item.destroy
respond_to do |format|
format.js { render 'score_items/index', locals: { new: nil, evaluation_exercise: preload_eval_exercise(@score_item) } }
format.json { render status: :no_content }
format.json { head :no_content }
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/scores_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def destroy
set_common
respond_to do |format|
format.js { render 'feedbacks/show' }
format.json { render status: :no_content }
format.json { head :no_content }
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/factories/evaluations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
FactoryBot.define do
factory :evaluation do
series { { deadline: DateTime.now - 1.minute } }
series { association :series, deadline: DateTime.now - 1.minute }
deadline { series.deadline || (DateTime.now - 1.minute) }
released { false }
exercises { series.exercises }
Expand Down

0 comments on commit 9577e01

Please sign in to comment.