Remove state change for Match

This commit is contained in:
Daniel Schädler 2019-04-17 11:10:18 +02:00
parent 57a97f6c37
commit 1da10d6ca5
2 changed files with 0 additions and 7 deletions

View File

@ -7,7 +7,6 @@ class UpdateMatchScore
match_score = context.match_score match_score = context.match_score
match_score_params = context.match_score_params match_score_params = context.match_score_params
if match_score.update(match_score_params) if match_score.update(match_score_params)
match_score.match.state = 'in_progress'
context.fail! unless match_score.save context.fail! unless match_score.save
else else
context.fail! context.fail!

View File

@ -41,12 +41,6 @@ RSpec.describe MatchScoresController, type: :controller do
expect(@match_score.points).to eq(valid_update[:points]) expect(@match_score.points).to eq(valid_update[:points])
end end
it 'updates the matches state' do
put :update, params: { id: @match_score.to_param }.merge(valid_update)
@match_score.reload
expect(@match_score.match.state).to eq('in_progress')
end
it 'renders a response with the updated team' do it 'renders a response with the updated team' do
put :update, params: { id: @match_score.to_param }.merge(valid_update) put :update, params: { id: @match_score.to_param }.merge(valid_update)
expect(response).to be_successful expect(response).to be_successful