remove trailing white-spaces from test/integration/api_test/disabled_rest_api_test.rb.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6669 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
2a2cc6baf0
commit
0cbd686a85
|
@ -12,7 +12,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
Setting.rest_api_enabled = '1'
|
||||
Setting.login_required = '0'
|
||||
end
|
||||
|
||||
|
||||
# Using the NewsController because it's a simple API.
|
||||
context "get /news with the API disabled" do
|
||||
|
||||
|
@ -23,7 +23,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
@token = Token.generate!(:user => @user, :action => 'api')
|
||||
get "/news.xml?key=#{@token.value}"
|
||||
end
|
||||
|
||||
|
||||
should_respond_with :unauthorized
|
||||
should_respond_with_content_type :xml
|
||||
should "not login as the user" do
|
||||
|
@ -37,7 +37,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
@authorization = ActionController::HttpAuthentication::Basic.encode_credentials(@user.login, 'my_password')
|
||||
get "/news.xml", nil, :authorization => @authorization
|
||||
end
|
||||
|
||||
|
||||
should_respond_with :unauthorized
|
||||
should_respond_with_content_type :xml
|
||||
should "not login as the user" do
|
||||
|
@ -52,7 +52,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
@authorization = ActionController::HttpAuthentication::Basic.encode_credentials(@token.value, 'X')
|
||||
get "/news.xml", nil, :authorization => @authorization
|
||||
end
|
||||
|
||||
|
||||
should_respond_with :unauthorized
|
||||
should_respond_with_content_type :xml
|
||||
should "not login as the user" do
|
||||
|
@ -68,7 +68,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
@token = Token.generate!(:user => @user, :action => 'api')
|
||||
get "/news.json?key=#{@token.value}"
|
||||
end
|
||||
|
||||
|
||||
should_respond_with :unauthorized
|
||||
should_respond_with_content_type :json
|
||||
should "not login as the user" do
|
||||
|
@ -82,7 +82,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
@authorization = ActionController::HttpAuthentication::Basic.encode_credentials(@user.login, 'my_password')
|
||||
get "/news.json", nil, :authorization => @authorization
|
||||
end
|
||||
|
||||
|
||||
should_respond_with :unauthorized
|
||||
should_respond_with_content_type :json
|
||||
should "not login as the user" do
|
||||
|
@ -104,7 +104,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
|
|||
assert_equal User.anonymous, User.current
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue