Commit 2b96b4c2 authored by Hussain Kashef's avatar Hussain Kashef

added intro_course to volunteer xls

parent 95398b25
Pipeline #50142 passed with stage
in 36 minutes and 44 seconds
......@@ -28,7 +28,8 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
t_attr(:created_at),
t_attr(:updated_at),
t_attr(:assignment_count),
t_attr(:waive_alternative)
t_attr(:waive_alternative),
t_attr(:intro_course)
]
......@@ -60,7 +61,8 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
l(volunteer.created_at.localtime),
l(volunteer.updated_at.localtime),
volunteer.assignments.count,
volunteer.waive
volunteer.waive,
volunteer.intro_course
], types: cell_types, style: cell_styles
end
end
......@@ -8,4 +8,34 @@ class VolunteersXlsxExportTest < ActionDispatch::IntegrationTest
get volunteers_url(format: :xlsx)
assert_equal Mime[:xlsx], response.content_type
end
test 'xlsx files has the right columns' do
superadmin = create :user
volunteer = create :volunteer
login_as superadmin
wb = get_xls_from_response(volunteers_url(format: :xlsx))
assert_xls_cols_equal(
wb, 1, 0,
'id',
'Anrede',
'Nachname',
'Vorname',
'Strasse',
'Adresszusatz',
'PLZ',
'Ort',
'Telefonnummer',
'Telefonnummer 2',
'Mailadresse',
'Jahrgang',
'Nationalität',
'Beruf',
'Prozess',
'Anmeldedatum',
'Aktualisiert am',
'Anzahl begleitungen',
'Spesenverzicht',
'Einführungskurs besucht'
)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment