Test group_stage state being assigned correctly
This commit is contained in:
parent
bb1b8798d8
commit
41194ee181
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
RSpec.describe GroupStageService do
|
RSpec.describe GroupStageService, focus: true do
|
||||||
before do
|
before do
|
||||||
@teams1 = create_list(:team, 4)
|
@teams1 = create_list(:team, 4)
|
||||||
@teams2 = create_list(:team, 4)
|
@teams2 = create_list(:team, 4)
|
||||||
|
|
@ -15,6 +15,10 @@ RSpec.describe GroupStageService do
|
||||||
expect(prepared_groups_groupstage).to be_a(Stage)
|
expect(prepared_groups_groupstage).to be_a(Stage)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'assigns the correct state' do
|
||||||
|
expect(prepared_groups_groupstage.state).to eq('in_progress')
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns a stage object with level -1' do
|
it 'returns a stage object with level -1' do
|
||||||
expect(prepared_groups_groupstage.level).to be(-1)
|
expect(prepared_groups_groupstage.level).to be(-1)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue