From 57af2ee2e51b614ac6e2fa81b1075a55d3c0c252 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Thu, 15 Oct 2015 10:11:56 +0200 Subject: Retain member and song info on errors in form. --- spec/registration_spec.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'spec/registration_spec.rb') diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb index 89e2fa5..7e4ca3a 100644 --- a/spec/registration_spec.rb +++ b/spec/registration_spec.rb @@ -53,25 +53,25 @@ describe RegistrationApp do it 'displays submitted data to user' do expect(last_response).to match(/Bandnavn\: #{band_params['name']}/) - expect(last_response).to match(/Hjemsted\: Oslo/) - expect(last_response).to match(/Webside\: http\:\/\/imbalance.no/) - expect(last_response).to match(/Plateselskap\: Calculated Imperfection/) - expect(last_response).to match(/Kort bio\: Thrash metal from Norway/) + expect(last_response).to match(/Hjemsted\: #{band_params['city']}/) + expect(last_response).to match(/Webside\: #{band_params['website']}/) + expect(last_response).to match(/Plateselskap\: #{band_params['label']}/) + expect(last_response).to match(/Kort bio\: #{band_params['shortbio']}/) expect(last_response).to match(/Kontaktperson: #{band_params['contact']['name']}/) expect(last_response).to match(/Kontaktadresse: #{band_params['contact']['addr']}/) expect(last_response).to match(/Telefon: #{band_params['contact']['phone']}/) expect(last_response).to match(/Epost: #{band_params['contact']['email']}/) - expect(last_response).to match(/Harald Eilertsen, Bass\/Vocals/) - expect(last_response).to match(/Welle, Drums/) - expect(last_response).to match(/Thormodr, Guitar/) + expect(last_response).to match(/#{band_params['members']['1']['name']}, #{band_params['members']['1']['instrument']}/) + expect(last_response).to match(/#{band_params['members']['2']['name']}, #{band_params['members']['2']['instrument']}/) + expect(last_response).to match(/#{band_params['members']['3']['name']}, #{band_params['members']['3']['instrument']}/) - expect(last_response).to match(/Bestial by Nature/) - expect(last_response).to match(/Spilletid: 02:80/) - expect(last_response).to match(/Utøvere: Harald Eilertsen, Thormod Steinert, Lars Welle/) - expect(last_response).to match(/Låtskrivere: Harald Eilertsen, Thormod Steinert/) - expect(last_response).to match(/Merknad: Rævrukkje rum kjurr!/) + expect(last_response).to match(/#{band_params['songs']['1']['title']}/) + expect(last_response).to match(/Spilletid: #{band_params['songs']['1']['time']}/) + expect(last_response).to match(/Utøvere: #{band_params['songs']['1']['performers'].split("\n").join(", ")}/) + expect(last_response).to match(/Låtskrivere: #{band_params['songs']['1']['composers'].split("\n").join(", ")}/) + expect(last_response).to match(/Merknad: #{band_params['songs']['1']['notes']}/) end it "generates a PDF file" do -- cgit v1.2.3