Allow max_attendees to be nil

This commit is contained in:
Stella Rouzi 2016-05-15 14:01:30 +03:00
parent 65ee166570
commit 528243c8b9
7 changed files with 50 additions and 41 deletions

View file

@ -416,6 +416,24 @@ describe ProposalController do
before { event.update_attributes(state: 'unconfirmed') }
context 'confirmed successfully' do
describe 'when require_registration is set' do
before :each do
event.require_registration = true
event.max_attendees = nil
event.save!
patch :confirm, conference_id: conference.short_title, id: event.id
end
it 'assigns url variable' do
expect(assigns(:url)).to eq '/conference/lama101/program/proposal/1'
end
it 'change state of event to confirmed' do
event.reload
expect(event.confirmed?).to be true
end
end
describe 'general actions' do
before { patch :confirm, conference_id: conference.short_title, id: event.id }