Add show_redactions checks to api old element show tests
This commit is contained in:
parent
46113c9cba
commit
1b977454f7
3 changed files with 24 additions and 0 deletions
|
@ -151,6 +151,10 @@ module Api
|
|||
get api_node_version_path(node, 1)
|
||||
|
||||
assert_response :forbidden, "Redacted node shouldn't be visible via the version API."
|
||||
|
||||
get api_node_version_path(node, 1, :show_redactions => "true")
|
||||
|
||||
assert_response :forbidden, "Redacted node shouldn't be visible via the version API when passing flag."
|
||||
end
|
||||
|
||||
def test_show_redacted_normal_user
|
||||
|
@ -160,6 +164,10 @@ module Api
|
|||
get api_node_version_path(node, 1), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted node shouldn't be visible via the version API, even when logged in."
|
||||
|
||||
get api_node_version_path(node, 1, :show_redactions => "true"), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted node shouldn't be visible via the version API, even when logged in and passing flag."
|
||||
end
|
||||
|
||||
# Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05
|
||||
|
|
|
@ -151,6 +151,10 @@ module Api
|
|||
get api_relation_version_path(relation, 1)
|
||||
|
||||
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API."
|
||||
|
||||
get api_relation_version_path(relation, 1, :show_redactions => "true")
|
||||
|
||||
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API when passing flag."
|
||||
end
|
||||
|
||||
def test_show_redacted_normal_user
|
||||
|
@ -160,6 +164,10 @@ module Api
|
|||
get api_relation_version_path(relation, 1), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API, even when logged in."
|
||||
|
||||
get api_relation_version_path(relation, 1, :show_redactions => "true"), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted relation shouldn't be visible via the version API, even when logged in and passing flag."
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -148,6 +148,10 @@ module Api
|
|||
get api_way_version_path(way, 1)
|
||||
|
||||
assert_response :forbidden, "Redacted way shouldn't be visible via the version API."
|
||||
|
||||
get api_way_version_path(way, 1, :show_redactions => "true")
|
||||
|
||||
assert_response :forbidden, "Redacted way shouldn't be visible via the version API when passing flag."
|
||||
end
|
||||
|
||||
def test_show_redacted_normal_user
|
||||
|
@ -157,6 +161,10 @@ module Api
|
|||
get api_way_version_path(way, 1), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted way shouldn't be visible via the version API, even when logged in."
|
||||
|
||||
get api_way_version_path(way, 1, :show_redactions => "true"), :headers => bearer_authorization_header
|
||||
|
||||
assert_response :forbidden, "Redacted way shouldn't be visible via the version API, even when logged in and passing flag."
|
||||
end
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue