mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Replace .today with .current in program spec
The cfp_open? method uses Date.current, so it should also be tested with Date.current and not Date.today Also, build was replaced with create to fix a false negative This is a partial fix for #1522
This commit is contained in:
parent
08e5f10559
commit
7a7fcced48
1 changed files with 2 additions and 2 deletions
|
|
@ -141,7 +141,7 @@ describe Program do
|
|||
describe '#cfp_open?' do
|
||||
describe 'returns true' do
|
||||
it 'when there is an open Call for Papers for the conference' do
|
||||
create(:cfp, start_date: Date.today - 2, end_date: Date.today, program_id: program.id)
|
||||
create(:cfp, start_date: Date.current - 2, end_date: Date.current, program_id: program.id)
|
||||
expect(program.cfp_open?).to be true
|
||||
end
|
||||
end
|
||||
|
|
@ -152,7 +152,7 @@ describe Program do
|
|||
end
|
||||
|
||||
it 'when the Call for Papers period is over' do
|
||||
build(:cfp, start_date: Date.today - 2, end_date: Date.today - 1, program_id: program.id)
|
||||
create(:cfp, start_date: Date.current - 2, end_date: Date.current - 1, program_id: program.id)
|
||||
expect(program.cfp_open?).to be false
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue