summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/time_entry_reports_controller_test.rb9
-rw-r--r--test/functional/timelog_controller_test.rb23
-rw-r--r--test/integration/routing/timelog_test.rb8
-rw-r--r--test/unit/helpers/routes_helper_test.rb4
4 files changed, 1 insertions, 43 deletions
diff --git a/test/functional/time_entry_reports_controller_test.rb b/test/functional/time_entry_reports_controller_test.rb
index a70beec4a..c4ba0f7fe 100644
--- a/test/functional/time_entry_reports_controller_test.rb
+++ b/test/functional/time_entry_reports_controller_test.rb
@@ -128,15 +128,6 @@ class TimeEntryReportsControllerTest < ActionController::TestCase
assert_equal "4.25", "%.2f" % assigns(:report).total_hours
end
- def test_report_at_issue_level
- get :report, :issue_id => 1, :columns => 'month', :from => "2007-01-01", :to => "2007-12-31", :criteria => ["user", "activity"]
- assert_response :success
- assert_template 'report'
- assert_not_nil assigns(:report)
- assert_equal "154.25", "%.2f" % assigns(:report).total_hours
- assert_select 'form#query_form[action=?]', '/issues/1/time_entries/report'
- end
-
def test_report_by_week_should_use_commercial_year
TimeEntry.delete_all
TimeEntry.generate!(:hours => '2', :spent_on => '2009-12-25') # 2009-52
diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb
index eafea27c7..25bfea2fa 100644
--- a/test/functional/timelog_controller_test.rb
+++ b/test/functional/timelog_controller_test.rb
@@ -676,20 +676,6 @@ class TimelogControllerTest < ActionController::TestCase
assert_select 'form#query_form[action=?]', '/projects/ecookbook/time_entries'
end
- def test_index_at_issue_level
- get :index, :issue_id => 1
- assert_response :success
- assert_template 'index'
- assert_not_nil assigns(:entries)
- assert_equal 2, assigns(:entries).size
- assert_not_nil assigns(:total_hours)
- assert_equal 154.25, assigns(:total_hours)
- # display all time
- assert_nil assigns(:from)
- assert_nil assigns(:to)
- assert_select 'form#query_form[action=?]', '/issues/1/time_entries'
- end
-
def test_index_should_sort_by_spent_on_and_created_on
t1 = TimeEntry.create!(:user => User.find(1), :project => Project.find(1), :hours => 1, :spent_on => '2012-06-16', :created_on => '2012-06-16 20:00:00', :activity_id => 10)
t2 = TimeEntry.create!(:user => User.find(1), :project => Project.find(1), :hours => 1, :spent_on => '2012-06-16', :created_on => '2012-06-16 20:05:00', :activity_id => 10)
@@ -809,15 +795,6 @@ class TimelogControllerTest < ActionController::TestCase
end
end
- def test_index_at_issue_level_should_include_csv_export_dialog
- get :index, :issue_id => 3
- assert_response :success
-
- assert_select '#csv-export-options' do
- assert_select 'form[action=?][method=get]', '/issues/3/time_entries.csv'
- end
- end
-
def test_index_csv_all_projects
with_settings :date_format => '%m/%d/%Y' do
get :index, :format => 'csv'
diff --git a/test/integration/routing/timelog_test.rb b/test/integration/routing/timelog_test.rb
index 9a2057329..b7a219c65 100644
--- a/test/integration/routing/timelog_test.rb
+++ b/test/integration/routing/timelog_test.rb
@@ -40,10 +40,7 @@ class RoutingTimelogsTest < Redmine::RoutingTest
end
def test_timelogs_scoped_under_issues
- should_route 'GET /issues/234/time_entries' => 'timelog#index', :issue_id => '234'
- should_route 'GET /issues/234/time_entries.csv' => 'timelog#index', :issue_id => '234', :format => 'csv'
- should_route 'GET /issues/234/time_entries.atom' => 'timelog#index', :issue_id => '234', :format => 'atom'
- should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234'
+ should_route 'GET /issues/234/time_entries/new' => 'timelog#new', :issue_id => '234'
should_route 'POST /issues/234/time_entries' => 'timelog#create', :issue_id => '234'
end
@@ -53,9 +50,6 @@ class RoutingTimelogsTest < Redmine::RoutingTest
should_route 'GET /projects/foo/time_entries/report' => 'timelog#report', :project_id => 'foo'
should_route 'GET /projects/foo/time_entries/report.csv' => 'timelog#report', :project_id => 'foo', :format => 'csv'
-
- should_route 'GET /issues/234/time_entries/report' => 'timelog#report', :issue_id => '234'
- should_route 'GET /issues/234/time_entries/report.csv' => 'timelog#report', :issue_id => '234', :format => 'csv'
end
def test_timelogs_bulk_edit
diff --git a/test/unit/helpers/routes_helper_test.rb b/test/unit/helpers/routes_helper_test.rb
index dd92ea67a..ec977c156 100644
--- a/test/unit/helpers/routes_helper_test.rb
+++ b/test/unit/helpers/routes_helper_test.rb
@@ -26,15 +26,11 @@ class RoutesHelperTest < ActionView::TestCase
def test_time_entries_path
assert_equal '/projects/ecookbook/time_entries', _time_entries_path(Project.find(1), nil)
- assert_equal '/issues/1/time_entries', _time_entries_path(Project.find(1), Issue.find(1))
- assert_equal '/issues/1/time_entries', _time_entries_path(nil, Issue.find(1))
assert_equal '/time_entries', _time_entries_path(nil, nil)
end
def test_report_time_entries_path
assert_equal '/projects/ecookbook/time_entries/report', _report_time_entries_path(Project.find(1), nil)
- assert_equal '/issues/1/time_entries/report', _report_time_entries_path(Project.find(1), Issue.find(1))
- assert_equal '/issues/1/time_entries/report', _report_time_entries_path(nil, Issue.find(1))
assert_equal '/time_entries/report', _report_time_entries_path(nil, nil)
end