Track related refactoring

Add roles as nested routes to track (for the track organizer role)
Allow transition from to_accept to to_reject and backwards
Split Track#valid_dates validation to many independent ones
Show all the confirmed tracks in the conference's splashpage
Add comment in admin/Tracks#toggle_cfp_inclusion
Rewrite admin/TracksController#accept spec
Add feature spec for track requests
Change 'In' to 'Room' in Tracks#index
Rewrite Track#overlapping
Refactor code in ProposalsController
Fix typos
This commit is contained in:
AEtherC0r3 2017-08-17 13:36:46 +03:00 committed by Stella Rouzi
parent 9c4892bfc8
commit 27fa79a826
21 changed files with 279 additions and 144 deletions

View file

@ -3,7 +3,7 @@ require 'spec_helper'
describe Cfp do
subject { create(:cfp) }
let!(:conference) { create(:conference, end_date: Date.today) }
let!(:cfp) { create(:cfp, start_date: Date.today - 2, end_date: Date.today - 1, program_id: conference.program.id) }
let!(:cfp) { create(:cfp, cfp_type: 'events', start_date: Date.today - 2, end_date: Date.today - 1, program_id: conference.program.id) }
describe 'validations' do
it { is_expected.to validate_presence_of(:cfp_type) }
@ -18,7 +18,7 @@ describe Cfp do
end
it 'returns nil when the cfp for events doesn\'t exist' do
conference.program.cfp.destroy
cfp.destroy!
expect(conference.program.cfps.for_events).to eq nil
end
end