mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Make ticket layout configurable
Added option for conference organizer to switch between ticket layouts (horizontal or vertical). Added test for the same.
This commit is contained in:
parent
e25de318bd
commit
dd52a9b2ab
10 changed files with 38 additions and 2 deletions
20
spec/controllers/physical_ticket_controller_spec.rb
Normal file
20
spec/controllers/physical_ticket_controller_spec.rb
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe PhysicalTicketController do
|
||||
let(:conference) { create(:conference) }
|
||||
let(:user) { create(:user) }
|
||||
let(:paid_ticket_purchase) { create(:ticket_purchase, conference: conference, user: user) }
|
||||
let(:physical_ticket) { create(:physical_ticket, ticket_purchase: paid_ticket_purchase) }
|
||||
|
||||
describe 'GET #show' do
|
||||
before :each do
|
||||
sign_in user
|
||||
get :show, id: physical_ticket.id, conference_id: conference.short_title
|
||||
end
|
||||
|
||||
it 'assigns ticket_layout' do
|
||||
ticket_layout = conference.ticket_layout.to_sym
|
||||
expect(assigns(:ticket_layout)).to eq ticket_layout
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue