Skip to content

Commit

Permalink
Allow editing of diversity & first-time responses
Browse files Browse the repository at this point in the history
closes #7, closes #8
  • Loading branch information
AndrewKvalheim committed Jul 11, 2020
1 parent 732e996 commit a1ef411
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/views/proposals/_proposal_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@

= f.input :pnw, label: 'I am local to the Pacific Northwest'

= f.input :diversity, label: 'I identify as a member of a group that is historically under-represented in technology'

= f.input :first_time, label: 'This will be my first time speaking at a conference'

= f.inputs 'Enable pre-registration' do
= f.input :require_registration, label: 'Require participants to register to your event'
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
Expand Down
4 changes: 4 additions & 0 deletions spec/features/proposals_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@
select('Easy', from: 'event[difficulty_level_id]')

check 'I am local to the Pacific Northwest'
check 'I identify as a member of a group that is historically under-represented in technology'
check 'This will be my first time speaking at a conference'

expect {
click_button 'Update Proposal'
expect(flash).to eq('Proposal was successfully updated.')
proposal.reload
}.to change { proposal.pnw }
.and change { proposal.diversity }
.and change { proposal.first_time }
end

scenario 'signed_in user submits a valid proposal', feature: true, js: true do
Expand Down

0 comments on commit a1ef411

Please sign in to comment.