2019-01-08 00:20:31 +02:00
|
|
|
require "rails_helper"
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
feature "Volunteering" do
|
2019-01-08 00:20:31 +02:00
|
|
|
before do
|
|
|
|
Rails.application.load_seed
|
|
|
|
sign_in_as_admin
|
|
|
|
create_new_conference
|
|
|
|
sign_out
|
|
|
|
end
|
|
|
|
|
2019-04-28 21:10:54 +03:00
|
|
|
scenario "A user applies to be a volunteer for the upcoming conference" do
|
2019-01-08 00:20:31 +02:00
|
|
|
visit root_path
|
2019-04-28 21:10:54 +03:00
|
|
|
click_on I18n.t("views.volunteers.apply")
|
2019-01-08 00:20:31 +02:00
|
|
|
|
|
|
|
fill_in_volunteer_profile
|
2019-04-28 21:10:54 +03:00
|
|
|
expect(page).to have_content I18n.t("views.volunteers.successful_application")
|
2019-01-08 18:16:32 +02:00
|
|
|
|
|
|
|
sign_in_as_admin
|
|
|
|
click_on_first_conference_in_management_root
|
2019-04-28 21:10:54 +03:00
|
|
|
click_on I18n.t("activerecord.models.volunteership", count: 2).capitalize
|
|
|
|
expect(page).to have_content "Volunteer Foo"
|
2019-01-08 00:20:31 +02:00
|
|
|
end
|
|
|
|
end
|