From b746308da7610ceaa6a3e9dc3f2ef1c556d96ad0 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Mon, 7 Mar 2011 11:24:46 +0100 Subject: [PATCH] bugfix: link_to_project is already defined in application_helper in 1.1.0 and hence removed from reporting_helper; functionality is equivalent --- app/helpers/reporting_helper.rb | 4 ---- features/navigations.feature | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 features/navigations.feature diff --git a/app/helpers/reporting_helper.rb b/app/helpers/reporting_helper.rb index b7fa2f3303..2f69d9b384 100644 --- a/app/helpers/reporting_helper.rb +++ b/app/helpers/reporting_helper.rb @@ -58,10 +58,6 @@ module ReportingHelper {:name => :remove_filter, :filter_name => filter.underscore_name}] end - def link_to_project(project) - link_to project.name, :controller => 'projects', :action => 'show', :id => project - end - def mapped(value, klass, default) id = value.to_i return default if id < 0 diff --git a/features/navigations.feature b/features/navigations.feature new file mode 100644 index 0000000000..e83aa99c91 --- /dev/null +++ b/features/navigations.feature @@ -0,0 +1,21 @@ +Feature: Navigating to reports page + + @javascript + Scenario: Navigating to the cost report of a project which is a subproject + Given there is 1 project with the following: + | name | ParentProject | + | identifier | parent_project_1 | + And the project "ParentProject" has 1 subproject with the following: + | name | SubProject | + | identifier | parent_project_1_sub_1 | + And there is 1 user with the following: + | login | bob | + And there is a role "Testrole" + And the role "Testrole" may have the following rights: + | view_cost_entries | + | view_own_cost_entries | + And the user "bob" is a "Testrole" in the project "SubProject" + When I login as "bob" + And I go to the page of the project called "SubProject" + And I follow "Cost Reports" within "#main-menu" + Then I should see "Cost Report" within "#content"