diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-22 11:26:57 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-03-22 11:26:57 +0000 |
commit | 9000cdbf2fba9cebef2cdf1a9333bfa00ee8bf81 (patch) | |
tree | 8ac785c1c34f578561708eeb9a071d4eea2c23f8 /test/functional/repositories_mercurial_controller_test.rb | |
parent | d5ee82cea91eaceab3839fd2f67d8118acaaed77 (diff) | |
download | redmine-9000cdbf2fba9cebef2cdf1a9333bfa00ee8bf81.tar.gz redmine-9000cdbf2fba9cebef2cdf1a9333bfa00ee8bf81.zip |
scm: mercurial: add test of binary file should be force download in functional test (#6256).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5202 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_mercurial_controller_test.rb')
-rw-r--r-- | test/functional/repositories_mercurial_controller_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 830915a79..8247bcb00 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -219,6 +219,13 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase assert @response.body.include?('WITHOUT ANY WARRANTY') end + def test_entry_binary_force_download + get :entry, :id => PRJ_ID, :rev => 1, :path => ['images', 'edit.png'] + assert_response :success + # TODO: 'image/png' + assert_equal 'application/octet-stream', @response.content_type + end + def test_directory_entry get :entry, :id => PRJ_ID, :path => ['sources'] assert_response :success @@ -226,7 +233,7 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase assert_not_nil assigns(:entry) assert_equal 'sources', assigns(:entry).name end - + def test_diff @repository.fetch_changesets @repository.reload |