##// END OF EJS Templates
Fixes mercurial adapter....
Fixes mercurial adapter. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4541 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4395:17f86d964fe0
r4427:f7529c94f651
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