From 9848898695256d589b272dcc8e560186b6f60141 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 8 Jan 2019 18:16:32 +0200 Subject: [PATCH] Verify that the volunteer appears in the management interface --- spec/features/volunteership_spec.rb | 5 +++++ spec/support/feature_helpers.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/features/volunteership_spec.rb b/spec/features/volunteership_spec.rb index 526e2a2..e6c4037 100644 --- a/spec/features/volunteership_spec.rb +++ b/spec/features/volunteership_spec.rb @@ -14,5 +14,10 @@ feature 'Volunteering' do fill_in_volunteer_profile expect(page).to have_content I18n.t('views.volunteers.successful_application') + + sign_in_as_admin + click_on_first_conference_in_management_root + click_on I18n.t('activerecord.models.volunteership', count: 2).capitalize + expect(page).to have_content 'Volunteer Foo' end end diff --git a/spec/support/feature_helpers.rb b/spec/support/feature_helpers.rb index 083d56f..164dacf 100644 --- a/spec/support/feature_helpers.rb +++ b/spec/support/feature_helpers.rb @@ -113,7 +113,7 @@ module FeatureHelpers def fill_in_volunteer_profile attach_file Volunteer.human_attribute_name(:picture), Rails.root.join('spec', 'support', 'picture.jpg') - fill_in Volunteer.human_attribute_name(:name), with: 'Foo' + fill_in Volunteer.human_attribute_name(:name), with: 'Volunteer Foo' fill_in Volunteer.human_attribute_name(:email), with: 'foo@example.com' fill_in Volunteer.human_attribute_name(:phone), with: '+359666666' check VolunteerTeam.first.name