Commit 3cf814ff authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

remove duplicate finder in features/steps/path

parent c3659ef2
...@@ -173,12 +173,10 @@ module SharedPaths ...@@ -173,12 +173,10 @@ module SharedPaths
# ---------------------------------------- # ----------------------------------------
And 'I visit project "Shop" page' do And 'I visit project "Shop" page' do
project = Project.find_by_name("Shop")
visit project_path(project) visit project_path(project)
end end
When 'I visit edit project "Shop" page' do When 'I visit edit project "Shop" page' do
project = Project.find_by_name("Shop")
visit edit_project_path(project) visit edit_project_path(project)
end end
...@@ -219,7 +217,7 @@ module SharedPaths ...@@ -219,7 +217,7 @@ module SharedPaths
end end
And 'I visit project "Shop" issues page' do And 'I visit project "Shop" issues page' do
visit project_issues_path(Project.find_by_name("Shop")) visit project_issues_path(project)
end end
Given 'I visit issue page "Release 0.4"' do Given 'I visit issue page "Release 0.4"' do
...@@ -228,7 +226,7 @@ module SharedPaths ...@@ -228,7 +226,7 @@ module SharedPaths
end end
Given 'I visit project "Shop" labels page' do Given 'I visit project "Shop" labels page' do
visit project_labels_path(Project.find_by_name("Shop")) visit project_labels_path(project)
end end
Given 'I visit merge request page "Bug NS-04"' do Given 'I visit merge request page "Bug NS-04"' do
...@@ -242,20 +240,18 @@ module SharedPaths ...@@ -242,20 +240,18 @@ module SharedPaths
end end
And 'I visit project "Shop" merge requests page' do And 'I visit project "Shop" merge requests page' do
visit project_merge_requests_path(Project.find_by_name("Shop")) visit project_merge_requests_path(project)
end end
Given 'I visit project "Shop" milestones page' do Given 'I visit project "Shop" milestones page' do
@project = Project.find_by_name("Shop") visit project_milestones_path(project)
visit project_milestones_path(@project)
end end
Then 'I visit project "Shop" team page' do Then 'I visit project "Shop" team page' do
visit project_team_index_path(Project.find_by_name("Shop")) visit project_team_index_path(project)
end end
Then 'I visit project "Shop" wall page' do Then 'I visit project "Shop" wall page' do
project = Project.find_by_name("Shop")
visit wall_project_path(project) visit wall_project_path(project)
end end
...@@ -266,4 +262,8 @@ module SharedPaths ...@@ -266,4 +262,8 @@ module SharedPaths
def root_ref def root_ref
@project.repository.root_ref @project.repository.root_ref
end end
def project
project = Project.find_by_name!("Shop")
end
end end
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