comparison test/integration/api_test/token_authentication_test.rb @ 909:cbb26bc654de redmine-1.3

Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author Chris Cannam
date Fri, 24 Feb 2012 19:09:32 +0000
parents 8661b858af72
children 622f24f53b42 261b3d9a4903
comparison
equal deleted inserted replaced
908:c6c2cbd0afee 909:cbb26bc654de
1 require File.expand_path('../../../test_helper', __FILE__) 1 require File.expand_path('../../../test_helper', __FILE__)
2 2
3 class ApiTest::TokenAuthenticationTest < ActionController::IntegrationTest 3 class ApiTest::TokenAuthenticationTest < ActionController::IntegrationTest
4 fixtures :all 4 fixtures :projects, :trackers, :issue_statuses, :issues,
5 :enumerations, :users, :issue_categories,
6 :projects_trackers,
7 :roles,
8 :member_roles,
9 :members,
10 :enabled_modules,
11 :workflows
5 12
6 def setup 13 def setup
7 Setting.rest_api_enabled = '1' 14 Setting.rest_api_enabled = '1'
8 Setting.login_required = '1' 15 Setting.login_required = '1'
9 end 16 end
10 17
11 def teardown 18 def teardown
12 Setting.rest_api_enabled = '0' 19 Setting.rest_api_enabled = '0'
13 Setting.login_required = '0' 20 Setting.login_required = '0'
14 end 21 end
15 22
16 # Using the NewsController because it's a simple API. 23 # Using the NewsController because it's a simple API.
17 context "get /news" do 24 context "get /news" do
18 context "in :xml format" do 25 context "in :xml format" do
19 should_allow_key_based_auth(:get, "/news.xml") 26 should_allow_key_based_auth(:get, "/news.xml")
20 end 27 end