summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/attachments_controller_test.rb7
-rw-r--r--test/functional/repositories_git_controller_test.rb7
2 files changed, 12 insertions, 2 deletions
diff --git a/test/functional/attachments_controller_test.rb b/test/functional/attachments_controller_test.rb
index bc37c3181..8c0375d6d 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 873b3e284..dc82f7c73 100644
--- a/test/functional/repositories_git_controller_test.rb
+++ b/test/functional/repositories_git_controller_test.rb
@@ -395,8 +395,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'