diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-28 03:51:33 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-09-28 03:51:33 +0000 |
commit | d69cae859f9276227203afb9419a4d1e2eca296f (patch) | |
tree | 2f336f08269861052e08672c313425e253372245 | |
parent | 59d4d210a76ba11a89fddb978c9a1dfbb92ac37c (diff) | |
download | redmine-d69cae859f9276227203afb9419a4d1e2eca296f.tar.gz redmine-d69cae859f9276227203afb9419a4d1e2eca296f.zip |
Merged r10501 from trunk
set user preference diff type nil at functional tests.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@10504 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | test/functional/attachments_controller_test.rb | 7 | ||||
-rw-r--r-- | test/functional/repositories_git_controller_test.rb | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb index d06d9e81a..1e37ed9ff 100644 --- a/test/functional/attachments_controller_test.rb +++ b/test/functional/attachments_controller_test.rb @@ -96,8 +96,13 @@ class AttachmentsControllerTest < ActionController::TestCase end def test_save_diff_type - @request.session[:user_id] = 1 # admin + user1 = User.find(1) + user1.pref[:diff_type] = nil + user1.preference.save user = User.find(1) + assert_nil user.pref[:diff_type] + + @request.session[:user_id] = 1 # admin get :show, :id => 5 assert_response :success assert_template 'diff' diff --git a/test/functional/repositories_git_controller_test.rb b/test/functional/repositories_git_controller_test.rb index df8d5cf72..09cd8b105 100644 --- a/test/functional/repositories_git_controller_test.rb +++ b/test/functional/repositories_git_controller_test.rb @@ -387,8 +387,13 @@ class RepositoriesGitControllerTest < ActionController::TestCase end def test_save_diff_type - @request.session[:user_id] = 1 # admin + user1 = User.find(1) + user1.pref[:diff_type] = nil + user1.preference.save user = User.find(1) + assert_nil user.pref[:diff_type] + + @request.session[:user_id] = 1 # admin get :diff, :id => PRJ_ID, :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7' |