Remove state change for Match
This commit is contained in:
parent
57a97f6c37
commit
1da10d6ca5
|
|
@ -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!
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue