Mercurial > hg > soundsoftware-site
comparison .svn/pristine/cf/cf0bca266fbc21a03db30e949b23e76b71b26da6.svn-base @ 926:b73a59a6acbd luisf
Merge from cannam_integration
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Fri, 11 May 2012 16:10:11 +0100 |
parents | cbb26bc654de |
children |
comparison
equal
deleted
inserted
replaced
925:5bf2b9fac683 | 926:b73a59a6acbd |
---|---|
1 require File.expand_path('../../../test_helper', __FILE__) | |
2 | |
3 class ApiTest::TokenAuthenticationTest < 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 context "in :xml format" do | |
26 should_allow_key_based_auth(:get, "/news.xml") | |
27 end | |
28 | |
29 context "in :json format" do | |
30 should_allow_key_based_auth(:get, "/news.json") | |
31 end | |
32 end | |
33 end |