Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/admin/events/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
.col-12.col-md-6.col-lg-4
= f.association :gold_sponsors, input_html: { data: { placeholder: 'Select gold sponsors' }}, collection: all_sponsors
.col-12
= f.input :organisers, collection: all_managers, value_method: :id, label_method: :full_name, selected: @event.organisers.pluck(&:id), input_html: { multiple: true }
= f.input :organisers, collection: all_managers, value_method: :id, label_method: :full_name, selected: @event.organisers.pluck(:id), input_html: { multiple: true }
.col-12
= f.input :announce_only, as: :boolean, hint: 'Events where invitations are not handled via our application'
.col-12
Expand Down
13 changes: 12 additions & 1 deletion spec/features/admin/manage_event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,25 @@

find_by_id('event_chapter_ids_chosen').click
find('.add-all-chapters', text: 'Add to all').click
expect(page).to have_css('.search-choice', count: Chapter.count)
within('#event_chapter_ids_chosen') do
expect(page).to have_css('.search-choice', count: Chapter.count)
end

click_on 'Save'

expect(page).to have_text('You have just updated the event')
expect(event.reload.chapter_ids).to match_array(Chapter.ids)
end

scenario 'editing an event keeps its existing organisers' do
visit edit_admin_event_path(event)

click_on 'Save'

expect(page).to have_text('You have just updated the event')
expect(event.reload.organisers).to include(member)
end

scenario 'verifying an attendance' do
invitation = Fabricate(:invitation, event:, attending: true)
visit admin_event_path(event)
Expand Down
2 changes: 1 addition & 1 deletion spec/models/concerns/listable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'with scopes' do
describe '#today_and_upcoming' do
it 'returns a list of all today and upcoming workshops' do
travel_to(Time.current) do
travel_to(Time.current.middle_of_day) do
Fabricate.times(2, :past_workshop)
future_workshops = Fabricate.times(1, :workshop)

Expand Down