commit
6a127a29a3
4 changed files with 16 additions and 24 deletions
|
|
@ -13,6 +13,8 @@ feature Event do
|
|||
@options = {}
|
||||
@options[:send_mail] = 'false'
|
||||
@event = create(:event, program: conference.program, title: 'Example Proposal')
|
||||
@event.event_users.create(user: participant, event_role: 'submitter')
|
||||
@event.event_users.create(user: participant, event_role: 'speaker')
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
|
|
@ -63,10 +65,6 @@ feature Event do
|
|||
context 'as a participant' do
|
||||
before(:each) do
|
||||
@event.accept!(@options)
|
||||
@event.event_users = [create(:event_user,
|
||||
user_id: participant.id,
|
||||
event_id: @event.id,
|
||||
event_role: 'submitter')]
|
||||
end
|
||||
|
||||
scenario 'not signed_in user submits proposal' do
|
||||
|
|
|
|||
|
|
@ -103,11 +103,15 @@ describe 'User' do
|
|||
it{ should be_able_to(:create, Subscription.new(user_id: user.id)) }
|
||||
it{ should be_able_to(:destroy, subscription) }
|
||||
|
||||
it{ should be_able_to(:manage, user_event_with_cfp) }
|
||||
it{ should be_able_to(:update, user_event_with_cfp) }
|
||||
it{ should be_able_to(:show, user_event_with_cfp) }
|
||||
it{ should be_able_to(:delete, user_event_with_cfp) }
|
||||
it{ should_not be_able_to(:new, Event.new(program: program_without_cfp)) }
|
||||
it{ should_not be_able_to(:create, Event.new(program: program_without_cfp)) }
|
||||
it{ should_not be_able_to(:new, Event.new(program: program_with_cfp, event_users: [event_user2])) }
|
||||
it{ should_not be_able_to(:create, Event.new(program: program_with_cfp, event_users: [event_user2])) }
|
||||
# TODO: At moment it's not possible to manually add someone else as event_user
|
||||
# This needs some more work once we allow user to add event_user
|
||||
it 'should_not be_able to :new, Event.new(program: program_with_cfp, event_users: [event_user2])'
|
||||
it 'should_not be_able to :create, Event.new(program: program_with_cfp, event_users: [event_user2])'
|
||||
|
||||
it{ should_not be_able_to(:manage, event_unconfirmed) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue