mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
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:
@@ -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'}}
|
||||
|
||||
Reference in New Issue
Block a user