summaryrefslogtreecommitdiffstats
path: root/spec/registration_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/registration_spec.rb')
-rw-r--r--spec/registration_spec.rb26
1 files changed, 21 insertions, 5 deletions
diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb
index e4d5ff4..89e2fa5 100644
--- a/spec/registration_spec.rb
+++ b/spec/registration_spec.rb
@@ -58,10 +58,10 @@ describe RegistrationApp do
expect(last_response).to match(/Plateselskap\: Calculated Imperfection/)
expect(last_response).to match(/Kort bio\: Thrash metal from Norway/)
- expect(last_response).to match(/Kontaktperson: Harald Eilertsen/)
- expect(last_response).to match(/Kontaktadresse: Gamleveien 13\n1289 Snufstad/)
- expect(last_response).to match(/Telefon: 98765432/)
- expect(last_response).to match(/Epost: mail@imbalance\.no/)
+ 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/)
@@ -88,7 +88,7 @@ describe RegistrationApp do
end
shared_examples_for('form with errors') do |args|
- let (:band_params) { create_band_params(args) }
+ let(:band_params) { create_band_params(args) }
describe "form with errors" do
before :each do
@@ -116,5 +116,21 @@ describe RegistrationApp do
context 'with a band name with only spaces' do
it_behaves_like('form with errors', {:name => ' '})
end
+
+ context 'with no contact' do
+ it_behaves_like('form with errors', {:contact_name => ''})
+ end
+
+ context 'with no contact address' do
+ it_behaves_like('form with errors', {:contact_addr => ''})
+ end
+
+ context 'with no contact phone' do
+ it_behaves_like('form with errors', {:contact_phone => ''})
+ end
+
+ context 'with no contact email' do
+ it_behaves_like('form with errors', {:contact_phone => ''})
+ end
end
end