Fix the legacy specs
This commit is contained in:
parent
a784c4b45a
commit
7533dc6b03
|
@ -1,25 +0,0 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Management::CallForParticipationsController, type: :controller do
|
||||
let(:user) { create :administrator }
|
||||
let(:conference) { create :conference }
|
||||
before { sign_in user }
|
||||
|
||||
describe 'POST #create' do
|
||||
it 'opens the CFP of the specified conference' do
|
||||
expect do
|
||||
post 'create', conference_id: conference.id, format: :js
|
||||
end.to change { Conference.find(conference.id).call_for_participation.in_progress? }.from(false).to(true)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'DELETE #destroy' do
|
||||
it 'closes the CFP of the specified conference' do
|
||||
conference.call_for_participation.open!
|
||||
|
||||
expect do
|
||||
delete 'destroy', conference_id: conference.id, format: :js
|
||||
end.to change { Conference.find(conference.id).call_for_participation.in_progress? }.from(true).to(false)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -7,6 +7,7 @@ FactoryGirl.define do
|
|||
description 'MyText'
|
||||
start_date '2014-07-29 21:29:13'
|
||||
end_date '2014-07-31 21:29:13'
|
||||
planned_cfp_end_date '2014-07-28'
|
||||
|
||||
factory :past_conference do
|
||||
start_date Date.today - 10.days
|
||||
|
|
|
@ -3,5 +3,7 @@ FactoryGirl.define do
|
|||
name { |n| "Track #{n}" }
|
||||
description 'MyText'
|
||||
conference
|
||||
minimum_length '45'
|
||||
maximum_length '60'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,5 +4,14 @@ FactoryGirl.define do
|
|||
length { 60 }
|
||||
abstract { 'foo' }
|
||||
description { 'foo' }
|
||||
conference
|
||||
language :bg
|
||||
after(:build) do |event, evaluator|
|
||||
evaluator.conference.tracks << create(:track)
|
||||
event.track = evaluator.conference.tracks.first
|
||||
|
||||
evaluator.conference.event_types << create(:event_type)
|
||||
event.event_type = evaluator.conference.event_types.first
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue