2012-09-10 09:35:23 -04:00
|
|
|
class CreateProject < Spinach::FeatureSteps
|
2012-09-10 11:35:03 -04:00
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
2012-09-10 09:35:23 -04:00
|
|
|
|
|
|
|
And 'fill project form with valid data' do
|
2013-01-04 14:45:30 -05:00
|
|
|
fill_in 'project_name', with: 'Empty'
|
2012-09-10 09:35:23 -04:00
|
|
|
click_button "Create project"
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I should see project page' do
|
|
|
|
current_path.should == project_path(Project.last)
|
2013-01-04 14:45:30 -05:00
|
|
|
page.should have_content "Empty"
|
2012-09-10 09:35:23 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
And 'I should see empty project instuctions' do
|
|
|
|
page.should have_content "git init"
|
|
|
|
page.should have_content "git remote"
|
|
|
|
page.should have_content Project.last.url_to_repo
|
|
|
|
end
|
2013-09-13 05:37:13 -04:00
|
|
|
|
|
|
|
Then 'I see empty project instuctions' do
|
|
|
|
page.should have_content "git init"
|
|
|
|
page.should have_content "git remote"
|
|
|
|
page.should have_content Project.last.url_to_repo
|
|
|
|
end
|
|
|
|
|
|
|
|
And 'I click on HTTP' do
|
|
|
|
click_button 'HTTP'
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'Remote url should update to http link' do
|
|
|
|
page.should have_content "git remote add origin #{Project.last.http_url_to_repo}"
|
|
|
|
end
|
|
|
|
|
|
|
|
And 'If I click on SSH' do
|
|
|
|
click_button 'SSH'
|
|
|
|
end
|
|
|
|
|
|
|
|
Then 'Remote url should update to ssh link' do
|
|
|
|
page.should have_content "git remote add origin #{Project.last.url_to_repo}"
|
|
|
|
end
|
2012-09-10 09:35:23 -04:00
|
|
|
end
|