mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 01:06:00 +01:00
Adds support for requesting information about current user using /users/current (#7141).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4544 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -50,6 +50,23 @@ class ApiTest::UsersTest < ActionController::IntegrationTest
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "GET /users/current" do
|
||||
context ".xml" do
|
||||
should "require authentication" do
|
||||
get '/users/current.xml'
|
||||
|
||||
assert_response 401
|
||||
end
|
||||
|
||||
should "return current user" do
|
||||
get '/users/current.xml', {}, :authorization => credentials('jsmith')
|
||||
|
||||
assert_tag :tag => 'user',
|
||||
:child => {:tag => 'id', :content => '2'}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "POST /users" do
|
||||
context "with valid parameters" do
|
||||
|
||||
Reference in New Issue
Block a user