summaryrefslogtreecommitdiffstats
path: root/spec/registration_spec.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-15 10:11:56 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-28 21:32:17 +0100
commit57af2ee2e51b614ac6e2fa81b1075a55d3c0c252 (patch)
tree81731790772b47e444b8a1abb70abdec543da2dd /spec/registration_spec.rb
parentc69ab8c2bc8dfa59070249dd434219d83a792dbc (diff)
downloadnorsk-urskog-registrations-57af2ee2e51b614ac6e2fa81b1075a55d3c0c252.tar.gz
norsk-urskog-registrations-57af2ee2e51b614ac6e2fa81b1075a55d3c0c252.tar.bz2
norsk-urskog-registrations-57af2ee2e51b614ac6e2fa81b1075a55d3c0c252.zip
Retain member and song info on errors in form.
Diffstat (limited to 'spec/registration_spec.rb')
-rw-r--r--spec/registration_spec.rb24
1 files changed, 12 insertions, 12 deletions
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