summaryrefslogtreecommitdiffstats
path: root/test/integration/application_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-06 10:20:27 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-06 10:20:27 +0000
commit9c282842a933e30a40053c72cf5add2ddf2af901 (patch)
treeeaea77d8da56c67390b4aa9104893f3d3a4c3282 /test/integration/application_test.rb
parent6da0542af48be717378e3885bf8278cc773be6f2 (diff)
downloadredmine-9c282842a933e30a40053c72cf5add2ddf2af901.tar.gz
redmine-9c282842a933e30a40053c72cf5add2ddf2af901.zip
Do not start user session when accessing atom feed with token-based authentication.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2779 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/application_test.rb')
-rw-r--r--test/integration/application_test.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb
index dc6fdf392..fba11e049 100644
--- a/test/integration/application_test.rb
+++ b/test/integration/application_test.rb
@@ -20,7 +20,7 @@ require "#{File.dirname(__FILE__)}/../test_helper"
class ApplicationTest < ActionController::IntegrationTest
include Redmine::I18n
- fixtures :users
+ fixtures :all
def test_set_localization
Setting.default_language = 'en'
@@ -42,4 +42,15 @@ class ApplicationTest < ActionController::IntegrationTest
assert_response :success
assert_tag :tag => 'h2', :content => 'Projects'
end
+
+ def test_token_based_access_should_not_start_session
+ # issue of a private project
+ get 'issues/4.atom'
+ assert_response 302
+
+ rss_key = User.find(2).rss_key
+ get "issues/4.atom?key=#{rss_key}"
+ assert_response 200
+ assert_nil session[:user_id]
+ end
end