Created
June 12, 2014 08:24
-
-
Save osiro/602e3f3233a8887298b6 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 'feature_helper' | |
feature "project coordinators can view a project" do | |
background do | |
sign_in_as :user | |
end | |
scenario "successfully viewing a project", js: true do | |
create_project_for_user | |
visit projects_path | |
page.execute_script("$(\"article[data-project-id=#{@project.id}] img\").click()") | |
current_path.should eq project_path(@project) | |
page.should have_content @project | |
end | |
private | |
def create_project_for_user | |
@project = FactoryGirl.create :project | |
ProjectCoordinator.create user: current_user, project: @project | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment