##// END OF EJS Templates
Rails3: replace "all" fixtures at test/integration/api_test/http_basic_login_test.rb...
Rails3: replace "all" fixtures at test/integration/api_test/http_basic_login_test.rb Following error raises. Fixture::FormatError: Bad data for Configuration::Empty fixture named default (nil) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7516 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r7396:250d4db29dd8
r7396:250d4db29dd8
Show More
http_basic_login_test.rb
38 lines | 1.1 KiB | text/x-ruby | RubyLexer
/ test / integration / api_test / http_basic_login_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
Added support for HTTP Basic access to the API. (#3920)...
r3105
Eric Davis
Move all API tests into the ApiTest module to make management easier...
r4243 class ApiTest::HttpBasicLoginTest < ActionController::IntegrationTest
Toshi MARUYAMA
Rails3: replace "all" fixtures at test/integration/api_test/http_basic_login_test.rb...
r7396 fixtures :projects, :trackers, :issue_statuses, :issues,
:enumerations, :users, :issue_categories,
:projects_trackers,
:roles,
:member_roles,
:members,
:enabled_modules,
:workflows
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
Toshi MARUYAMA
remove trailing white-spaces from test/integration/api_test/http_basic_login_test.rb....
r6550
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 # Using the NewsController because it's a simple API.
context "get /news" do
Eric Davis
Refactor: convert username/password http basic auth api tests to shoulda macros #6447...
r4246 setup do
project = Project.find('onlinestore')
EnabledModule.create(:project => project, :name => 'news')
end
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105
context "in :xml format" do
Eric Davis
Refactor: convert username/password http basic auth api tests to shoulda macros #6447...
r4246 should_allow_http_basic_auth_with_username_and_password(:get, "/projects/onlinestore/news.xml")
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 end
context "in :json format" do
Eric Davis
Refactor: convert username/password http basic auth api tests to shoulda macros #6447...
r4246 should_allow_http_basic_auth_with_username_and_password(:get, "/projects/onlinestore/news.json")
Jean-Philippe Lang
Fixed: API 401 response does not include WWW-Authenticate header (#5322)....
r3565 end
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 end
end