Created
July 6, 2015 03:32
-
-
Save osiro/04de6b6a99cd65bc8478 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
feature 'Volunteer can view profile of event', js: true do | |
sign_in_as(:volunteer) | |
scenario 'Volunteer participate to events' do | |
event = FactoryGirl.create(:event).decorate | |
visit(volunteer_event_path(event)) | |
within("table.shifts") do | |
click_on "Volunteer" | |
end | |
within(".shift-user.popup-content") do | |
expect(page).to have_content event.name | |
click_on "I want to volunteer" | |
end | |
within("table.shifts") do | |
expect(page).to have_content("Withdrawn") | |
end | |
expect(event.shifts.first.users).to include(current_user) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment