From b37f5105341a7a3e900fd30314e8c37b1d53c459 Mon Sep 17 00:00:00 2001 From: Malaber <32635600+Malaber@users.noreply.github.com> Date: Sat, 26 Oct 2019 01:32:17 +0200 Subject: [PATCH] Unnecessary Variables --- spec/controllers/matches_controller_spec.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/controllers/matches_controller_spec.rb b/spec/controllers/matches_controller_spec.rb index 38bc536..579f341 100644 --- a/spec/controllers/matches_controller_spec.rb +++ b/spec/controllers/matches_controller_spec.rb @@ -4,8 +4,7 @@ require 'rails_helper' def test_get_index_with_filter(filter_state) get :index, params: {state: filter_state, tournament_id: @tournament.to_param} - body = deserialize_response response - body.each do |match| + deserialize_response(response).each do |match| expect(match[:state]).to eq(filter_state) end end @@ -39,8 +38,7 @@ RSpec.describe MatchesController, type: :controller do end it 'doesn\'t break if the filter contains rubbish' do - filter_state = 'saftladen' - get :index, params: { state: filter_state, tournament_id: @tournament.to_param } + get :index, params: { state: 'saftladen', tournament_id: @tournament.to_param } body = deserialize_response response expect(body.empty?).to be true end