Merge branch 'master' into poll-shifts-search-officers
This commit is contained in:
@@ -36,6 +36,32 @@ feature 'Admin booths' do
|
||||
expect(page).to_not have_content "There are no booths"
|
||||
end
|
||||
|
||||
scenario "Available" do
|
||||
booth_for_current_poll = create(:poll_booth)
|
||||
booth_for_incoming_poll = create(:poll_booth)
|
||||
booth_for_expired_poll = create(:poll_booth)
|
||||
|
||||
current_poll = create(:poll, :current)
|
||||
incoming_poll = create(:poll, :incoming)
|
||||
expired_poll = create(:poll, :expired)
|
||||
|
||||
create(:poll_booth_assignment, poll: current_poll, booth: booth_for_current_poll)
|
||||
create(:poll_booth_assignment, poll: incoming_poll, booth: booth_for_incoming_poll)
|
||||
create(:poll_booth_assignment, poll: expired_poll, booth: booth_for_expired_poll)
|
||||
|
||||
visit admin_root_path
|
||||
|
||||
within('#side_menu') do
|
||||
click_link "Manage shifts"
|
||||
end
|
||||
|
||||
expect(page).to have_css(".booth", count: 2)
|
||||
|
||||
expect(page).to have_content booth_for_current_poll.name
|
||||
expect(page).to have_content booth_for_incoming_poll.name
|
||||
expect(page).to_not have_content booth_for_expired_poll.name
|
||||
end
|
||||
|
||||
scenario 'Show' do
|
||||
booth = create(:poll_booth)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user