summaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2015-10-10 18:36:09 +0200
committerHarald Eilertsen <haraldei@anduin.net>2015-10-10 18:36:09 +0200
commit800f8b9ee333fa703b30e3761124428564456908 (patch)
treea4b56b38c22a7c1cc7ffe0007390e540e7913bbc /spec/support
parentd9696a5eb4aa8638b757ca95b4cc2a4d5b8ae4f6 (diff)
downloadnorsk-urskog-registrations-800f8b9ee333fa703b30e3761124428564456908.tar.gz
norsk-urskog-registrations-800f8b9ee333fa703b30e3761124428564456908.tar.bz2
norsk-urskog-registrations-800f8b9ee333fa703b30e3761124428564456908.zip
Validate presence of contact info when submitting form.
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/band_factory.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/support/band_factory.rb b/spec/support/band_factory.rb
index 4bf9a15..498f532 100644
--- a/spec/support/band_factory.rb
+++ b/spec/support/band_factory.rb
@@ -2,7 +2,11 @@ module BandFactory
def create_band_params(options = {})
opts = {
:songs => 1,
- :name => 'Band name'
+ :name => 'Band name',
+ :contact_name => 'Contact Name',
+ :contact_addr => "Streetname 666\n1234Someplace Nice",
+ :contact_phone => '98765432',
+ :contact_email => 'band@example.com'
}.merge(options)
num_songs = opts.delete(:songs)
@@ -14,10 +18,10 @@ module BandFactory
'label' => 'Calculated Imperfection',
'shortbio' => 'Thrash metal from Norway',
'contact' => {
- 'name' => 'Harald Eilertsen',
- 'addr' => "Gamleveien 13\n1289 Snufstad",
- 'phone' => '98765432',
- 'email' => 'mail@imbalance.no'
+ 'name' => opts[:contact_name],
+ 'addr' => opts[:contact_addr],
+ 'phone' => opts[:contact_phone],
+ 'email' => opts[:contact_email]
},
'members' => {
'1' => {