diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-23 15:04:36 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-23 15:04:36 +0000 |
commit | b67b3820a10e916cadd38607e7ee27b531e2d448 (patch) | |
tree | 7d7908a7329e24d730db171ae9460e44e2cc6f3e /test | |
parent | 5b4bd8a59a721b98a4bf02ca364183c6f4bdbf46 (diff) | |
download | redmine-b67b3820a10e916cadd38607e7ee27b531e2d448.tar.gz redmine-b67b3820a10e916cadd38607e7ee27b531e2d448.zip |
Refactor: move IssuesController#changes to JournalsController#index.
Since #changes is only an Atom feed of journals of a query, it makes
more sense to have it on the JournalsController resource.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4034 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 9 | ||||
-rw-r--r-- | test/functional/journals_controller_test.rb | 7 | ||||
-rw-r--r-- | test/integration/routing_test.rb | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index dfdb74c42..7c00db708 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -231,13 +231,6 @@ class IssuesControllerTest < ActionController::TestCase assert_equal columns, session[:query][:column_names].map(&:to_s) end - def test_changes - get :changes, :project_id => 1 - assert_response :success - assert_not_nil assigns(:journals) - assert_equal 'application/atom+xml', @response.content_type - end - def test_show_by_anonymous get :show, :id => 1 assert_response :success @@ -307,7 +300,7 @@ class IssuesControllerTest < ActionController::TestCase def test_show_atom get :show, :id => 2, :format => 'atom' assert_response :success - assert_template 'changes.rxml' + assert_template 'journals/index.rxml' # Inline image assert_select 'content', :text => Regexp.new(Regexp.quote('http://test.host/attachments/download/10')) end diff --git a/test/functional/journals_controller_test.rb b/test/functional/journals_controller_test.rb index 7d8345b28..83e015af6 100644 --- a/test/functional/journals_controller_test.rb +++ b/test/functional/journals_controller_test.rb @@ -31,6 +31,13 @@ class JournalsControllerTest < ActionController::TestCase User.current = nil end + def test_index + get :index, :project_id => 1 + assert_response :success + assert_not_nil assigns(:journals) + assert_equal 'application/atom+xml', @response.content_type + end + def test_reply_to_issue @request.session[:user_id] = 2 get :new, :id => 1 diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb index 63293d594..b05a1285d 100644 --- a/test/integration/routing_test.rb +++ b/test/integration/routing_test.rb @@ -106,6 +106,8 @@ class RoutingTest < ActionController::IntegrationTest should_route :post, "/issues/preview/123", :controller => 'previews', :action => 'issue', :id => '123' should_route :get, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' should_route :post, "/issues/context_menu", :controller => 'context_menus', :action => 'issues' + + should_route :get, "/issues/changes", :controller => 'journals', :action => 'index' end context "issue categories" do |