##// END OF EJS Templates
Merged r4051 from trunk....
Merged r4051 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4121 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4007:d2a4265f86e4
r4007:d2a4265f86e4
Show More
files_controller_test.rb
29 lines | 881 B | text/x-ruby | RubyLexer
/ test / functional / files_controller_test.rb
Eric Davis
Merged r4051 from trunk....
r4007 require File.dirname(__FILE__) + '/../test_helper'
class FilesControllerTest < ActionController::TestCase
fixtures :all
def setup
@controller = FilesController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
@request.session[:user_id] = nil
Setting.default_language = 'en'
end
def test_index
get :index, :id => 1
assert_response :success
assert_template 'index'
assert_not_nil assigns(:containers)
# file attached to the project
assert_tag :a, :content => 'project_file.zip',
:attributes => { :href => '/attachments/download/8/project_file.zip' }
# file attached to a project's version
assert_tag :a, :content => 'version_file.zip',
:attributes => { :href => '/attachments/download/9/version_file.zip' }
end
end