summaryrefslogtreecommitdiffstats
path: root/spec/features/register_band_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/register_band_spec.rb')
-rw-r--r--spec/features/register_band_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/features/register_band_spec.rb b/spec/features/register_band_spec.rb
index 92bf9d3..625cb20 100644
--- a/spec/features/register_band_spec.rb
+++ b/spec/features/register_band_spec.rb
@@ -30,7 +30,7 @@ feature "Submit registration form" do
context "with invalid data" do
scenario "retains submitted data in form", js: true do
- @band_params['songs'] = nil
+ @band_params['name'] = ""
fill_in_form_with(@band_params)
expect(find_field('Bandnavn:').value).to eql(@band_params['name'])
@@ -48,6 +48,17 @@ feature "Submit registration form" do
within '#form-members .member-info' do
expect(find_field('Navn:').value).to eql(@band_params['members']['1']['name'])
+ expect(find_field('Instrument:').value).to eql(@band_params['members']['1']['instrument'])
+ expect(find_field('Alder:').value).to eql(@band_params['members']['1']['age'])
+ end
+
+ within '#form-songs #song-1-info' do
+ expect(find_field('Tittel:').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('Andre merknader:').value).to eql(@band_params['songs']['1']['notes'])
end
end
end