From 032d46f65ac3bbfe5c05f96e6b68d0dfe2a4aa3d Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 9 Sep 2017 16:54:50 +0200 Subject: Split contact address into street, postcode and city. --- spec/support/band_factory.rb | 8 ++++++-- spec/support/submit_form_helper.rb | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'spec/support') diff --git a/spec/support/band_factory.rb b/spec/support/band_factory.rb index 3ae2589..b092653 100644 --- a/spec/support/band_factory.rb +++ b/spec/support/band_factory.rb @@ -8,7 +8,9 @@ module BandFactory :label => 'A Record Label', :bio => 'A short bio about the band', :contact_name => 'Contact Name', - :contact_addr => "Streetname 666\n1234Someplace Nice", + :contact_street => "Streetname 666", + :contact_postcode => "1234", + :contact_city => "Someplace Nice", :contact_phone => '98765432', :contact_email => 'band@example.com', :members => "Member 1 (Instrument 1, 24\nMember 2 (Instrument 2)\nMember 3", @@ -24,7 +26,9 @@ module BandFactory 'shortbio' => opts[:bio], 'contact' => { 'name' => opts[:contact_name], - 'addr' => opts[:contact_addr], + 'street' => opts[:contact_street], + 'postcode' => opts[:contact_postcode], + 'city' => opts[:contact_city], 'phone' => opts[:contact_phone], 'email' => opts[:contact_email] }, diff --git a/spec/support/submit_form_helper.rb b/spec/support/submit_form_helper.rb index 30816cf..b9a64aa 100644 --- a/spec/support/submit_form_helper.rb +++ b/spec/support/submit_form_helper.rb @@ -9,7 +9,9 @@ module SubmitFormHelper within '#form-contact-info' do fill_in 'Navn:', with: params['contact']['name'] - fill_in 'Postadresse:', with: params['contact']['addr'] + fill_in 'Adresse:', with: params['contact']['street'] + fill_in 'Postnr:', with: params['contact']['postcode'] + fill_in 'Sted:', with: params['contact']['city'] fill_in 'Tlf:', with: params['contact']['phone'] fill_in 'E-post:', with: params['contact']['email'] end -- cgit v1.2.3