Commit ce0811ae authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve tests

parent f9e6f668
...@@ -70,8 +70,8 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps ...@@ -70,8 +70,8 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
find("#merge_request_source_branch").value.should have_content "new_design" find("#merge_request_source_branch").value.should have_content "new_design"
find("#merge_request_target_branch").value.should have_content "master" find("#merge_request_target_branch").value.should have_content "master"
find("#merge_request_title").value.should == "New Design" find("#merge_request_title").value.should == "New Design"
verify_commit_link(".mr_target_commit",@project) verify_commit_link(".mr_target_commit", @project)
verify_commit_link(".mr_source_commit",@forked_project) verify_commit_link(".mr_source_commit", @forked_project)
end end
step 'I update the merge request title' do step 'I update the merge request title' do
...@@ -114,7 +114,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps ...@@ -114,7 +114,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
step 'I fill out an invalid "Merge Request On Forked Project" merge request' do step 'I fill out an invalid "Merge Request On Forked Project" merge request' do
select "Select branch", from: "merge_request_target_branch" select "Select branch", from: "merge_request_target_branch"
find(:select, "merge_request_source_project_id", {}).value.should == @forked_project.id.to_s find(:select, "merge_request_source_project_id", {}).value.should == @forked_project.id.to_s
find(:select, "merge_request_target_project_id", {}).value.should == project.id.to_s find(:select, "merge_request_target_project_id", {}).value.should == @project.id.to_s
find(:select, "merge_request_source_branch", {}).value.should == "" find(:select, "merge_request_source_branch", {}).value.should == ""
find(:select, "merge_request_target_branch", {}).value.should == "" find(:select, "merge_request_target_branch", {}).value.should == ""
click_button "Compare branches" click_button "Compare branches"
...@@ -125,7 +125,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps ...@@ -125,7 +125,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end end
step 'the target repository should be the original repository' do step 'the target repository should be the original repository' do
page.should have_select("merge_request_target_project_id", selected: project.path_with_namespace) page.should have_select("merge_request_target_project_id", selected: @project.path_with_namespace)
end end
# Verify a link is generated against the correct project # Verify a link is generated against the correct project
......
...@@ -174,7 +174,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -174,7 +174,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_link 'add a file' click_link 'add a file'
# Remove pre-receive hook so we can push without auth # Remove pre-receive hook so we can push without auth
FileUtils.rm(File.join(Project.last.repository.path, 'hooks', 'pre-receive')) FileUtils.rm(File.join(@project.repository.path, 'hooks', 'pre-receive'))
end end
private private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment