From d207a31fc97edf4e19a50c4a650d6a34b4f5a2cf Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 16 Jul 2013 22:25:59 +0300 Subject: [PATCH] Fix tests and tab highlight --- app/helpers/tab_helper.rb | 4 ++-- features/steps/shared/paths.rb | 2 +- spec/features/gitlab_flavored_markdown_spec.rb | 2 +- spec/features/security/project_access_spec.rb | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/helpers/tab_helper.rb b/app/helpers/tab_helper.rb index 19aba0f5f6d..ce675872264 100644 --- a/app/helpers/tab_helper.rb +++ b/app/helpers/tab_helper.rb @@ -81,8 +81,8 @@ module TabHelper end def branches_tab_class - if current_page?(branches_project_repository_path(@project)) || - current_controller?(:protected_branches) || + if current_controller?(:protected_branches) || + current_controller?(:branches) || current_page?(project_repository_path(@project)) 'active' end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index 6853e8dd509..e63855e8fef 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -189,7 +189,7 @@ module SharedPaths end step 'I visit project branches page' do - visit branches_project_repository_path(@project) + visit project_branches_path(@project) end step 'I visit compare refs page' do diff --git a/spec/features/gitlab_flavored_markdown_spec.rb b/spec/features/gitlab_flavored_markdown_spec.rb index 53d31766a00..e67df7c1fb0 100644 --- a/spec/features/gitlab_flavored_markdown_spec.rb +++ b/spec/features/gitlab_flavored_markdown_spec.rb @@ -41,7 +41,7 @@ describe "GitLab Flavored Markdown" do end it "should render title in repositories#branches" do - visit branches_project_repository_path(project) + visit project_branches_path(project) page.should have_link("##{issue.id}") end diff --git a/spec/features/security/project_access_spec.rb b/spec/features/security/project_access_spec.rb index 8c65af061e0..8a1d20789f3 100644 --- a/spec/features/security/project_access_spec.rb +++ b/spec/features/security/project_access_spec.rb @@ -187,7 +187,7 @@ describe "Application access" do end describe "GET /project_code/repository/branches" do - subject { branches_project_repository_path(project) } + subject { project_branches_path(project) } before do # Speed increase @@ -429,7 +429,7 @@ describe "Application access" do end describe "GET /project_code/repository/branches" do - subject { branches_project_repository_path(project) } + subject { project_branches_path(project) } before do # Speed increase