Skip to content
Snippets Groups Projects
Commit ce0811ae authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Improve tests

parent f9e6f668
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -70,8 +70,8 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
find("#merge_request_source_branch").value.should have_content "new_design"
find("#merge_request_target_branch").value.should have_content "master"
find("#merge_request_title").value.should == "New Design"
verify_commit_link(".mr_target_commit",@project)
verify_commit_link(".mr_source_commit",@forked_project)
verify_commit_link(".mr_target_commit", @project)
verify_commit_link(".mr_source_commit", @forked_project)
end
 
step 'I update the merge request title' do
Loading
Loading
@@ -114,7 +114,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
step 'I fill out an invalid "Merge Request On Forked Project" merge request' do
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_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_target_branch", {}).value.should == ""
click_button "Compare branches"
Loading
Loading
@@ -125,7 +125,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
 
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
 
# Verify a link is generated against the correct project
Loading
Loading
Loading
Loading
@@ -174,7 +174,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_link 'add a file'
 
# 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
 
private
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment