##// END OF EJS Templates
update copyright year (#15977)...
update copyright year (#15977) Contributed by Daniel Felix. git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r12461:35cc911192e0
r12461:35cc911192e0
Show More
http_basic_login_test.rb
54 lines | 1.8 KiB | text/x-ruby | RubyLexer
/ test / integration / api_test / http_basic_login_test.rb
Jean-Philippe Lang
Adds missing copyright....
r11024 # Redmine - project management software
Toshi MARUYAMA
update copyright year (#15977)...
r12461 # Copyright (C) 2006-2014 Jean-Philippe Lang
Jean-Philippe Lang
Adds missing copyright....
r11024 #
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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
Jean-Philippe Lang
Adds a subclass of ActionDispatch::IntegrationTest for API tests....
r11023 class Redmine::ApiTest::HttpBasicLoginTest < Redmine::ApiTest::Base
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,
Jean-Philippe Lang
Removed unused fixtures....
r11122 :enabled_modules
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