diff options
author | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-23 13:04:56 +0400 |
---|---|---|
committer | Ciro Santillli <ciro.santilli@gmail.com> | 2014-02-23 13:34:39 +0400 |
commit | 170340e6b15f91e79cf683c892ec887c3115b317 (patch) | |
tree | 19cf1f82b08201295b3e66170a967e813c522189 /features/steps/project/fork.rb | |
parent | e868de687da060a109bd67fd492ed110eb134d47 (diff) |
Remove dir prefix and suffix from tests inside dir.
Diffstat (limited to 'features/steps/project/fork.rb')
-rw-r--r-- | features/steps/project/fork.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb new file mode 100644 index 00000000000..c00d9014b1d --- /dev/null +++ b/features/steps/project/fork.rb @@ -0,0 +1,36 @@ +class ForkProject < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedProject + + step 'I click link "Fork"' do + page.should have_content "Shop" + page.should have_content "Fork" + Gitlab::Shell.any_instance.stub(:fork_repository).and_return(true) + click_link "Fork" + end + + step 'I am a member of project "Shop"' do + @project = Project.find_by(name: "Shop") + @project ||= create(:project, name: "Shop", group: create(:group)) + @project.team << [@user, :reporter] + end + + step 'I should see the forked project page' do + page.should have_content "Project was successfully forked." + current_path.should include current_user.namespace.path + @forked_project = Project.find_by(namespace_id: current_user.namespace.path) + end + + step 'I already have a project named "Shop" in my namespace' do + current_user.namespace ||= create(:namespace) + current_user.namespace.should_not be_nil + current_user.namespace.path.should_not be_nil + @my_project = create(:project, name: "Shop", namespace: current_user.namespace) + end + + step 'I should see a "Name has already been taken" warning' do + page.should have_content "Name has already been taken" + end + +end |