Add user id to api trace output
This commit is contained in:
parent
aceae23c8e
commit
9682fe6431
2 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
attrs = {
|
attrs = {
|
||||||
"id" => trace.id,
|
"id" => trace.id,
|
||||||
"name" => trace.name,
|
"name" => trace.name,
|
||||||
|
"uid" => trace.user_id,
|
||||||
"user" => trace.user.display_name,
|
"user" => trace.user.display_name,
|
||||||
"visibility" => trace.visibility,
|
"visibility" => trace.visibility,
|
||||||
"pending" => trace.inserted ? "false" : "true",
|
"pending" => trace.inserted ? "false" : "true",
|
||||||
|
|
|
@ -52,6 +52,7 @@ module Api
|
||||||
auth_header = basic_authorization_header public_trace_file.user.display_name, "test"
|
auth_header = basic_authorization_header public_trace_file.user.display_name, "test"
|
||||||
get api_trace_path(public_trace_file), :headers => auth_header
|
get api_trace_path(public_trace_file), :headers => auth_header
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
assert_select "gpx_file[id='#{public_trace_file.id}'][uid='#{public_trace_file.user.id}']", 1
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check an anonymous trace can't be specifically fetched by another user
|
# Check an anonymous trace can't be specifically fetched by another user
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue