2013-03-19 15:37:50 +00:00
|
|
|
class ForkProject < Spinach::FeatureSteps
|
|
|
|
include SharedAuthentication
|
|
|
|
include SharedPaths
|
|
|
|
include SharedProject
|
|
|
|
|
|
|
|
step 'I click link "Fork"' do
|
2013-04-25 14:15:33 +00:00
|
|
|
page.should have_content "Shop"
|
|
|
|
page.should have_content "Fork"
|
2013-03-19 15:37:50 +00:00
|
|
|
click_link "Fork"
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I am a member of project "Shop"' do
|
2014-07-31 16:35:07 +00:00
|
|
|
@project = create(:project, name: "Shop")
|
2013-03-19 15:37:50 +00:00
|
|
|
@project.team << [@user, :reporter]
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see the forked project page' do
|
|
|
|
page.should have_content "Project was successfully forked."
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I already have a project named "Shop" in my namespace' do
|
2014-01-22 19:03:52 +00:00
|
|
|
@my_project = create(:project, name: "Shop", namespace: current_user.namespace)
|
2013-03-19 15:37:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should see a "Name has already been taken" warning' do
|
|
|
|
page.should have_content "Name has already been taken"
|
|
|
|
end
|
2013-06-22 15:57:34 +00:00
|
|
|
end
|