diff --git a/app/views/admin/poll/shifts/new.html.erb b/app/views/admin/poll/shifts/new.html.erb index b975c40a9..4e0665ea2 100644 --- a/app/views/admin/poll/shifts/new.html.erb +++ b/app/views/admin/poll/shifts/new.html.erb @@ -1,4 +1,4 @@ -<%= back_link_to admin_booths_path %> +<%= back_link_to available_admin_booths_path %>

<%= @booth.name %>

diff --git a/spec/features/admin/poll/booths_spec.rb b/spec/features/admin/poll/booths_spec.rb index 4eeb81cb6..1aa487b26 100644 --- a/spec/features/admin/poll/booths_spec.rb +++ b/spec/features/admin/poll/booths_spec.rb @@ -113,4 +113,18 @@ feature 'Admin booths' do end end + scenario "Back link go back to available list when manage shifts" do + poll = create(:poll, :current) + booth = create(:poll_booth) + assignment = create(:poll_booth_assignment, poll: poll, booth: booth) + + visit available_admin_booths_path + + within("#booth_#{booth.id}") do + click_link "Manage shifts" + end + + click_link "Go back" + expect(current_path).to eq(available_admin_booths_path) + end end