Test api old way show action without integration
This commit is contained in:
parent
0b802240df
commit
70d7be4cb9
1 changed files with 23 additions and 1 deletions
|
@ -80,7 +80,29 @@ module Api
|
||||||
"redacted node #{way_v1.way_id} version #{way_v1.version} shouldn't be present in the history, even when logged in."
|
"redacted node #{way_v1.way_id} version #{way_v1.version} shouldn't be present in the history, even when logged in."
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO: test_show
|
def test_show
|
||||||
|
way = create(:way, :with_history, :version => 2)
|
||||||
|
|
||||||
|
get api_way_version_path(way, 1)
|
||||||
|
|
||||||
|
assert_response :success
|
||||||
|
assert_dom "osm:root", 1 do
|
||||||
|
assert_dom "> way", 1 do
|
||||||
|
assert_dom "> @id", way.id.to_s
|
||||||
|
assert_dom "> @version", "1"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
get api_way_version_path(way, 2)
|
||||||
|
|
||||||
|
assert_response :success
|
||||||
|
assert_dom "osm:root", 1 do
|
||||||
|
assert_dom "> way", 1 do
|
||||||
|
assert_dom "> @id", way.id.to_s
|
||||||
|
assert_dom "> @version", "2"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
# test that redacted ways aren't visible, regardless of
|
# test that redacted ways aren't visible, regardless of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue