diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2016-08-09 23:39:29 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2016-08-09 23:39:29 +0200 |
commit | 9234e59e100b3d40478b6aca2375bde85601997f (patch) | |
tree | f7de675a9826e7057e8e2ccf4aff35925443a035 /spec | |
parent | 5818b4721ce417065b4fd6ee358064cd3f9ffee2 (diff) | |
download | norsk-urskog-registrations-9234e59e100b3d40478b6aca2375bde85601997f.tar.gz norsk-urskog-registrations-9234e59e100b3d40478b6aca2375bde85601997f.tar.bz2 norsk-urskog-registrations-9234e59e100b3d40478b6aca2375bde85601997f.zip |
Reenable registration form and make tests pass.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/register_band_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/register_band_spec.rb b/spec/features/register_band_spec.rb index a2bd454..798b0a8 100644 --- a/spec/features/register_band_spec.rb +++ b/spec/features/register_band_spec.rb @@ -7,7 +7,7 @@ feature "Submit registration form" do end context "with all fields filled in" do - scenario "displays thank you page", js: true do + scenario "displays thank you page" do fill_in_form_with(@band_params) expect(page).to have_content "Takk for at du vil være med på Norsk Urskog" @@ -29,7 +29,7 @@ feature "Submit registration form" do end context "with invalid data" do - scenario "retains submitted data in form", js: true do + scenario "retains submitted data in form" do @band_params['name'] = "" fill_in_form_with(@band_params) @@ -38,11 +38,11 @@ feature "Submit registration form" do expect(find_field('Webside:').value).to eql(@band_params['website']) expect(find_field('Plateselskap:').value).to eql(@band_params['label']) expect(find_field('Kort bio:').value).to eql(@band_params['shortbio']) - expect(find_field('Medlemmer:').value).to eql(@band_params['members']) + expect(find_field('Medlemmer:').value.gsub("\r\n", "\n")).to eql(@band_params['members']) within ('#form-contact-info') do expect(find_field('Navn:').value).to eql(@band_params['contact']['name']) - expect(find_field('Postadresse:').value).to eql(@band_params['contact']['addr']) + expect(find_field('Postadresse:').value.gsub("\r\n", "\n")).to eql(@band_params['contact']['addr']) expect(find_field('Tlf:').value).to eql(@band_params['contact']['phone']) expect(find_field('E-post:').value).to eql(@band_params['contact']['email']) end @@ -51,8 +51,8 @@ feature "Submit registration form" do expect(find_field('Låttittel:').value).to eql(@band_params['songs']['1']['title']) expect(find_field('Lengde:').value).to eql(@band_params['songs']['1']['time']) expect(find_field('ISRC-kode:').value).to eql(@band_params['songs']['1']['isrc']) - expect(find_field('Utøvere:').value).to eql(@band_params['songs']['1']['performers']) - expect(find_field('Opphavsmenn:').value).to eql(@band_params['songs']['1']['composers']) + expect(find_field('Utøvere:').value.gsub("\r\n", "\n")).to eql(@band_params['songs']['1']['performers']) + expect(find_field('Opphavsmenn:').value.gsub("\r\n", "\n")).to eql(@band_params['songs']['1']['composers']) expect(find_field('Andre merknader:').value).to eql(@band_params['songs']['1']['notes']) end end |