##// END OF EJS Templates
Merged r5091 from trunk....
Merged r5091 from trunk. scm: mercurial: add :order => 'id DESC' explicitly for MySQL test fails. Because :order => 'id DESC' is defined at 'has_many', there is no need to set 'order'. But, MySQL test fails. Sqlite3 and PostgreSQL pass. Is this MySQL bug? MySQL svn trunk test on Redmine CI server fails. But, svn 1.1-stable passes. If this is MySQL bug, this effects 1.1-stable, too. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@5092 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4395:17f86d964fe0
r4972:891ed84fe39e
Show More
token_authentication_test.rb
26 lines | 611 B | text/x-ruby | RubyLexer
/ test / integration / api_test / token_authentication_test.rb
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../../test_helper', __FILE__)
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104
Eric Davis
Move all API tests into the ApiTest module to make management easier...
r4243 class ApiTest::TokenAuthenticationTest < ActionController::IntegrationTest
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 fixtures :all
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 def setup
Eric Davis
Added an Admin setting to enable/disable the REST web service. (#3920)...
r3106 Setting.rest_api_enabled = '1'
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 Setting.login_required = '1'
end
def teardown
Eric Davis
Added an Admin setting to enable/disable the REST web service. (#3920)...
r3106 Setting.rest_api_enabled = '0'
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 Setting.login_required = '0'
end
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 # Using the NewsController because it's a simple API.
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 context "get /news" do
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 context "in :xml format" do
Eric Davis
Refactor: convert api key tests to shoulda macros for reuse. #6447...
r4244 should_allow_key_based_auth(:get, "/news.xml")
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 end
context "in :json format" do
Eric Davis
Refactor: convert api key tests to shoulda macros for reuse. #6447...
r4244 should_allow_key_based_auth(:get, "/news.json")
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 end
end
end