Add test for omitted playoff_teams_amount

This commit is contained in:
Daniel Schädler 2019-06-15 19:03:19 +02:00
parent 33c7ce9695
commit 6f7ce3f10f
1 changed files with 8 additions and 0 deletions

View File

@ -206,6 +206,14 @@ RSpec.describe TournamentsController, type: :controller do
end
end
context 'is forgotten' do
before do
post :create, params: create_group_tournament_data.except(:playoff_teams_amount)
end
it_should_behave_like 'wrong playoff_teams_amount'
end
context 'is not a power of two' do
before do
post :create, params: create_group_tournament_data.merge(playoff_teams_amount: 18)