summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/registration_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/registration_spec.rb b/spec/registration_spec.rb
index 9dc7616..3ccfbe7 100644
--- a/spec/registration_spec.rb
+++ b/spec/registration_spec.rb
@@ -167,6 +167,26 @@ describe RegistrationApp do
context 'with no contact email' do
include_examples('form with errors', {:contact_email => ''})
end
+
+ context 'with invalid contact email' do
+ context 'missing domain info' do
+ include_examples('form with errors', {:contact_email => 'blaff'})
+ end
+
+ context 'missing top level domain' do
+ include_examples('form with errors', {:contact_email => 'blaff@merz'})
+ end
+ end
+
+ context 'with invalid phone number' do
+ context 'containing invalid chars' do
+ include_examples('form with errors', {:contact_phone => '756balle'})
+ end
+
+ context 'containing too few numbers' do
+ include_examples('form with errors', {:contact_phone => '7568923'})
+ end
+ end
end
context 'when registration is closed' do