summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-16 18:27:33 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-16 18:27:33 +0000
commit969bf2107b2ebcdb480cbb56f523ecb72643146d (patch)
tree07b0722156787256d9a511aaf70d4995dacf2a73 /test
parentbde8ab84f27426e425ba2d6a7e733571fcd5242e (diff)
downloadredmine-969bf2107b2ebcdb480cbb56f523ecb72643146d.tar.gz
redmine-969bf2107b2ebcdb480cbb56f523ecb72643146d.zip
Refactor: split VersionsController#new into #new and #create
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4090 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/versions_controller_test.rb8
-rw-r--r--test/integration/routing_test.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb
index 9e8cdf90d..1b33ba816 100644
--- a/test/functional/versions_controller_test.rb
+++ b/test/functional/versions_controller_test.rb
@@ -75,10 +75,10 @@ class VersionsControllerTest < ActionController::TestCase
assert_tag :tag => 'h2', :content => /1.0/
end
- def test_new
+ def test_create
@request.session[:user_id] = 2 # manager
assert_difference 'Version.count' do
- post :new, :project_id => '1', :version => {:name => 'test_add_version'}
+ post :create, :project_id => '1', :version => {:name => 'test_add_version'}
end
assert_redirected_to '/projects/ecookbook/settings/versions'
version = Version.find_by_name('test_add_version')
@@ -86,10 +86,10 @@ class VersionsControllerTest < ActionController::TestCase
assert_equal 1, version.project_id
end
- def test_new_from_issue_form
+ def test_create_from_issue_form
@request.session[:user_id] = 2 # manager
assert_difference 'Version.count' do
- xhr :post, :new, :project_id => '1', :version => {:name => 'test_add_version_from_issue_form'}
+ xhr :post, :create, :project_id => '1', :version => {:name => 'test_add_version_from_issue_form'}
end
assert_response :success
assert_select_rjs :replace, 'issue_fixed_version_id'
diff --git a/test/integration/routing_test.rb b/test/integration/routing_test.rb
index ba4948008..794a7780e 100644
--- a/test/integration/routing_test.rb
+++ b/test/integration/routing_test.rb
@@ -257,7 +257,7 @@ class RoutingTest < ActionController::IntegrationTest
should_route :get, "/versions/show/1", :controller => 'versions', :action => 'show', :id => '1'
should_route :get, "/versions/edit/1", :controller => 'versions', :action => 'edit', :id => '1'
- should_route :post, "/projects/foo/versions/new", :controller => 'versions', :action => 'new', :project_id => 'foo'
+ should_route :post, "/projects/foo/versions", :controller => 'versions', :action => 'create', :project_id => 'foo'
should_route :post, "/versions/update/1", :controller => 'versions', :action => 'update', :id => '1'
should_route :delete, "/versions/destroy/1", :controller => 'versions', :action => 'destroy', :id => '1'