Merge branch 'master' into admin-ticketing

* master: (61 commits)
  Replace more Commercials with Materials
  Rename more commericals to materials
  UI -- Repalce "Commerials" with "Materials".
  Re-order Conference Associations
  Cleanup CSS add Snap! style block attachments
  hide venue link if there is no venue link
  No dropshadow
  Text with drop shadow for now
  Tidy up the look of lodging panels
  Show reg status for tickets.
  Tweak CSS, fix loding order
  Move the venue description to below the map.
  Update lodging styling. Add description for venu when map is shown.
  CSS tweaks...
  Make the edit form not so wide.
  Support markdown in more fields
  Cleanup CSS ordering, fix coloring for navdropdowns
  dumb...fix order of link_to args
  ARRRGHHH, another typo...same line...
  fix typo
  ...
This commit is contained in:
Michael Ball 2020-02-06 01:37:38 -08:00
commit 4306fbe636
82 changed files with 423 additions and 428 deletions

View file

@ -290,14 +290,15 @@ describe ConferenceRegistrationsController, type: :controller do
before do
@registration = create(:registration,
conference: conference,
user: user,
arrival: Date.new(2014, 04, 25))
user: user)
end
context 'updates successfully' do
before do
patch :update, params: { registration: attributes_for(:registration, arrival: Date.new(2014, 04, 29)),
conference_id: conference.short_title }
patch :update, params: {
registration: attributes_for(:registration, volunteer: true),
conference_id: conference.short_title
}
end
it 'redirects to registration show path' do
@ -309,16 +310,17 @@ describe ConferenceRegistrationsController, type: :controller do
end
it 'updates the registration' do
@registration.reload
expect(@registration.arrival).to eq Date.new(2014, 04, 29)
expect{ @registration.reload }.to change(@registration, :updated_at)
end
end
context 'update fails' do
before do
allow_any_instance_of(Registration).to receive(:update_attributes).and_return(false)
patch :update, params: { registration: attributes_for(:registration, arrival: Date.new(2014, 04, 27)),
conference_id: conference.short_title }
patch :update, params: {
registration: attributes_for(:registration, volunteer: true),
conference_id: conference.short_title
}
end
it 'renders edit template' do
@ -331,7 +333,7 @@ describe ConferenceRegistrationsController, type: :controller do
it 'does not update the registration' do
@registration.reload
expect(@registration.arrival).to eq Date.new(2014, 04, 25)
expect { @registration.reload }.not_to change(@registration, :updated_at)
end
end
end