Mercurial > hg > soundsoftware-site
comparison .svn/pristine/f8/f8143c93fa1582a0422fb7d8b83ff1b7610b8c1d.svn-base @ 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 | |
children |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 require File.expand_path('../../../test_helper', __FILE__) | |
2 | |
3 class ApiTest::HttpBasicLoginTest < ActionController::IntegrationTest | |
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 | |
12 | |
13 def setup | |
14 Setting.rest_api_enabled = '1' | |
15 Setting.login_required = '1' | |
16 end | |
17 | |
18 def teardown | |
19 Setting.rest_api_enabled = '0' | |
20 Setting.login_required = '0' | |
21 end | |
22 | |
23 # Using the NewsController because it's a simple API. | |
24 context "get /news" do | |
25 setup do | |
26 project = Project.find('onlinestore') | |
27 EnabledModule.create(:project => project, :name => 'news') | |
28 end | |
29 | |
30 context "in :xml format" do | |
31 should_allow_http_basic_auth_with_username_and_password(:get, "/projects/onlinestore/news.xml") | |
32 end | |
33 | |
34 context "in :json format" do | |
35 should_allow_http_basic_auth_with_username_and_password(:get, "/projects/onlinestore/news.json") | |
36 end | |
37 end | |
38 end |