uploads: only let users see their own uploads on /uploads listing.

This commit is contained in:
evazion
2020-04-06 14:12:57 -05:00
parent b2ee1f0766
commit 1e0f6f730a
4 changed files with 17 additions and 3 deletions

View File

@@ -157,10 +157,10 @@ class UploadsControllerTest < ActionDispatch::IntegrationTest
server: @upload.server
}
get uploads_path, params: { search: search_params }
get_auth uploads_path, @user, params: { search: search_params }
assert_response :success
get uploads_path(format: :json), params: { search: search_params }
get_auth uploads_path(format: :json), @user, params: { search: search_params }
assert_response :success
assert_equal(@upload.id, response.parsed_body.first["id"])
end