summaryrefslogtreecommitdiffstats
path: root/test/functional/documents_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-18 21:26:30 +0000
commitec31b616982f137abdee8d0c6aa9dc4a6d103189 (patch)
treee4f5dc564be2b4ce5047a1f5acb2790fdc3b70ca /test/functional/documents_controller_test.rb
parent1db54e228d98d20536133bf52a8af0ce67616dc3 (diff)
downloadredmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.tar.gz
redmine-ec31b616982f137abdee8d0c6aa9dc4a6d103189.zip
Removes calls to #assert_template and #assigns in functional tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@15695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/documents_controller_test.rb')
-rw-r--r--test/functional/documents_controller_test.rb10
1 files changed, 2 insertions, 8 deletions
diff --git a/test/functional/documents_controller_test.rb b/test/functional/documents_controller_test.rb
index 94ba46cd9..ad1e6b567 100644
--- a/test/functional/documents_controller_test.rb
+++ b/test/functional/documents_controller_test.rb
@@ -33,8 +33,6 @@ class DocumentsControllerTest < Redmine::ControllerTest
get :index, :project_id => 'ecookbook'
assert_response :success
- assert_template 'index'
- assert_not_nil assigns(:grouped)
# Default category selected in the new document form
assert_select 'select[name=?]', 'document[category_id]' do
@@ -74,7 +72,6 @@ LOREM
get :index, :project_id => 'ecookbook'
assert_response :success
- assert_template 'index'
# should only truncate on new lines to avoid breaking wiki formatting
assert_select '.wiki p', :text => (doc.description.split("\n").first + '...')
@@ -84,14 +81,12 @@ LOREM
def test_show
get :show, :id => 1
assert_response :success
- assert_template 'show'
end
def test_new
@request.session[:user_id] = 2
get :new, :project_id => 1
assert_response :success
- assert_template 'new'
end
def test_create_with_one_attachment
@@ -122,7 +117,7 @@ LOREM
post :create, :project_id => 'ecookbook', :document => { :title => ''}
end
assert_response :success
- assert_template 'new'
+ assert_select_error /title cannot be blank/i
end
def test_create_non_default_category
@@ -146,7 +141,6 @@ LOREM
@request.session[:user_id] = 2
get :edit, :id => 1
assert_response :success
- assert_template 'edit'
end
def test_update
@@ -161,7 +155,7 @@ LOREM
@request.session[:user_id] = 2
put :update, :id => 1, :document => {:title => ''}
assert_response :success
- assert_template 'edit'
+ assert_select_error /title cannot be blank/i
end
def test_destroy