Rails3: test: template must be specified as controller/action not with their extension any more

Contributed by Sylvain Utard.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7543 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-09-28 10:11:42 +00:00
parent dab836a385
commit 33d41583bb
1 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ class GanttsControllerTest < ActionController::TestCase
get :show, :project_id => 1 get :show, :project_id => 1
assert_response :success assert_response :success
assert_template 'show.html.erb' assert_template 'gantts/show'
assert_not_nil assigns(:gantt) assert_not_nil assigns(:gantt)
# Issue with start and due dates # Issue with start and due dates
i = Issue.find(1) i = Issue.find(1)
@ -34,7 +34,7 @@ class GanttsControllerTest < ActionController::TestCase
get :show, :project_id => 1 get :show, :project_id => 1
assert_response :success assert_response :success
assert_template 'show.html.erb' assert_template 'gantts/show'
assert_not_nil assigns(:gantt) assert_not_nil assigns(:gantt)
end end
@ -44,14 +44,14 @@ class GanttsControllerTest < ActionController::TestCase
get :show, :project_id => 1 get :show, :project_id => 1
assert_response :success assert_response :success
assert_template 'show.html.erb' assert_template 'gantts/show'
assert_not_nil assigns(:gantt) assert_not_nil assigns(:gantt)
end end
should "work cross project" do should "work cross project" do
get :show get :show
assert_response :success assert_response :success
assert_template 'show.html.erb' assert_template 'gantts/show'
assert_not_nil assigns(:gantt) assert_not_nil assigns(:gantt)
assert_not_nil assigns(:gantt).query assert_not_nil assigns(:gantt).query
assert_nil assigns(:gantt).project assert_nil assigns(:gantt).project
@ -60,7 +60,7 @@ class GanttsControllerTest < ActionController::TestCase
should "not disclose private projects" do should "not disclose private projects" do
get :show get :show
assert_response :success assert_response :success
assert_template 'show.html.erb' assert_template 'gantts/show'
assert_tag 'a', :content => /eCookbook/ assert_tag 'a', :content => /eCookbook/
# Root private project # Root private project