##// END OF EJS Templates
Redmine links can be used to link to documents, versions and attachments....
Redmine links can be used to link to documents, versions and attachments. For now, attachments of the current object can be referenced only (if you're on an issue, it's possible reference attachments of this issue only). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1064 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r875:ad68a82be19f
r1050:702b521b453a
Show More
news_controller_test.rb
48 lines | 1.6 KiB | text/x-ruby | RubyLexer
/ test / functional / news_controller_test.rb
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 # redMine - project management software
# Copyright (C) 2006-2007 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require File.dirname(__FILE__) + '/../test_helper'
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 require 'news_controller'
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336
# Re-raise errors caught by the controller.
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 class NewsController; def rescue_action(e) raise e end; end
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 class NewsControllerTest < Test::Unit::TestCase
fixtures :projects, :users, :roles, :members, :enabled_modules
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 def setup
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 @controller = NewsController.new
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 @request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 User.current = nil
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 end
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 def test_index
get :index
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 assert_response :success
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 assert_template 'index'
assert_not_nil assigns(:newss)
assert_nil assigns(:project)
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 end
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875
def test_index_with_project
get :index, :project_id => 1
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 assert_response :success
Jean-Philippe Lang
Moved ProjectsController#list_news to NewsController#index....
r875 assert_template 'index'
assert_not_nil assigns(:newss)
Jean-Philippe Lang
added rss/atom feeds at project levels for:...
r336 end
end