diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-04 06:23:38 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-04 06:23:38 +0000 |
commit | 2789cf250617c5e55df9510c6eae21e073936d2c (patch) | |
tree | 25ef18117fa7dc97f1f9e3eaca33cd755562dcdd /test | |
parent | af50c1e13e6786695b823a32c3b2e778277e7f64 (diff) | |
download | redmine-2789cf250617c5e55df9510c6eae21e073936d2c.tar.gz redmine-2789cf250617c5e55df9510c6eae21e073936d2c.zip |
attachment: fix that diff type is not saved in user preference (#10152)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8761 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/attachments_controller_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index dd5c05fdf..2cf79672d 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -95,6 +95,21 @@ class AttachmentsControllerTest < ActionController::TestCase set_tmp_attachments_directory end + def test_save_diff_type + @request.session[:user_id] = 1 # admin + user = User.find(1) + get :show, :id => 5 + assert_response :success + assert_template 'diff' + user.reload + assert_equal "inline", user.pref[:diff_type] + get :show, :id => 5, :type => 'sbs' + assert_response :success + assert_template 'diff' + user.reload + assert_equal "sbs", user.pref[:diff_type] + end + def test_show_text_file get :show, :id => 4 assert_response :success |