comparison test/functional/.svn/text-base/previews_controller_test.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2

Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author Chris Cannam
date Mon, 06 Jun 2011 14:24:13 +0100
parents 8661b858af72
children
comparison
equal deleted inserted replaced
245:051f544170fe 441:cbce1fd3b1b7
1 # Redmine - project management software
2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
1 require File.expand_path('../../test_helper', __FILE__) 18 require File.expand_path('../../test_helper', __FILE__)
2 19
3 class PreviewsControllerTest < ActionController::TestCase 20 class PreviewsControllerTest < ActionController::TestCase
4 fixtures :all 21 fixtures :all
5 22
16 post :issue, :project_id => '1', :id => 1, :issue => {:description => Issue.find(1).description}, :notes => 'Foo' 33 post :issue, :project_id => '1', :id => 1, :issue => {:description => Issue.find(1).description}, :notes => 'Foo'
17 assert_response :success 34 assert_response :success
18 assert_template 'preview' 35 assert_template 'preview'
19 assert_not_nil assigns(:notes) 36 assert_not_nil assigns(:notes)
20 end 37 end
38
39 def test_preview_journal_notes_for_update
40 @request.session[:user_id] = 2
41 post :issue, :project_id => '1', :id => 1, :notes => 'Foo'
42 assert_response :success
43 assert_template 'preview'
44 assert_not_nil assigns(:notes)
45 assert_tag :p, :content => 'Foo'
46 end
21 47
22 def test_news 48 def test_news
23 get :news, :project_id => 1, 49 get :news, :project_id => 1,
24 :news => {:title => '', 50 :news => {:title => '',
25 :description => 'News description', 51 :description => 'News description',