Skip to content

Instantly share code, notes, and snippets.

@osiro
Created July 6, 2015 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osiro/04de6b6a99cd65bc8478 to your computer and use it in GitHub Desktop.
Save osiro/04de6b6a99cd65bc8478 to your computer and use it in GitHub Desktop.
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