From 537cccfa9ea47acdb6971acb313c8e5b25f1f4b0 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Sun, 26 May 2019 20:08:04 +0200 Subject: [PATCH] Force save match_scores --- spec/controllers/matches_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/matches_controller_spec.rb b/spec/controllers/matches_controller_spec.rb index f50e67a..7606be1 100644 --- a/spec/controllers/matches_controller_spec.rb +++ b/spec/controllers/matches_controller_spec.rb @@ -73,7 +73,7 @@ RSpec.describe MatchesController, type: :controller do before do @running_playoff_match.match_scores.each_with_index do |ms, i| ms.points = i - ms.save + ms.save! end put :update, params: { id: @running_playoff_match.to_param }.merge(finished) @running_playoff_match.reload