Refactor: rename method ProjectsController#add to ProjectsController#new

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4069 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-09-07 15:00:27 +00:00
parent 06878e5004
commit 2295b61cb6
8 changed files with 18 additions and 19 deletions

View File

@@ -87,16 +87,16 @@ class ProjectsControllerTest < ActionController::TestCase
end
end
context "#add" do
context "#new" do
context "by admin user" do
setup do
@request.session[:user_id] = 1
end
should "accept get" do
get :add
get :new
assert_response :success
assert_template 'add'
assert_template 'new'
end
end
@@ -108,9 +108,9 @@ class ProjectsControllerTest < ActionController::TestCase
end
should "accept get" do
get :add
get :new
assert_response :success
assert_template 'add'
assert_template 'new'
assert_no_tag :select, :attributes => {:name => 'project[parent_id]'}
end
end
@@ -123,9 +123,9 @@ class ProjectsControllerTest < ActionController::TestCase
end
should "accept get" do
get :add, :parent_id => 'ecookbook'
get :new, :parent_id => 'ecookbook'
assert_response :success
assert_template 'add'
assert_template 'new'
# parent project selected
assert_tag :select, :attributes => {:name => 'project[parent_id]'},
:child => {:tag => 'option', :attributes => {:value => '1', :selected => 'selected'}}