Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: google_apis/drive/drive_api_requests_unittest.cc

Issue 2854653004: Add parameter to issue URLs for querying a ChangeList of a Team Drive. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « google_apis/drive/drive_api_requests.cc ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_requests_unittest.cc
diff --git a/google_apis/drive/drive_api_requests_unittest.cc b/google_apis/drive/drive_api_requests_unittest.cc
index 0ad1815f5d10a69d08bd91ef4b67406c2c84be9b..80c6f3e56d3d41711fd489b5873332df30e8235d 100644
--- a/google_apis/drive/drive_api_requests_unittest.cc
+++ b/google_apis/drive/drive_api_requests_unittest.cc
@@ -194,6 +194,12 @@ class DriveApiRequestsTest : public testing::Test {
testing_properties_.push_back(public_property);
}
+ void EnableTeamDrivesIntegration() {
+ GURL test_base_url = test_util::GetBaseUrlForTesting(test_server_.port());
+ url_generator_.reset(new DriveApiUrlGenerator(
+ test_base_url, test_base_url, TEAM_DRIVES_INTEGRATION_ENABLED));
+ }
+
base::MessageLoopForIO message_loop_; // Test server needs IO thread.
net::EmbeddedTestServer test_server_;
std::unique_ptr<RequestSender> request_sender_;
@@ -764,6 +770,7 @@ TEST_F(DriveApiRequestsTest, AppsListRequest) {
}
TEST_F(DriveApiRequestsTest, ChangesListRequest) {
+ EnableTeamDrivesIntegration();
// Set an expected data file containing valid result.
expected_data_file_path_ = test_util::GetTestFilePath(
"drive/changelist.json");
@@ -782,14 +789,18 @@ TEST_F(DriveApiRequestsTest, ChangesListRequest) {
request->set_include_deleted(true);
request->set_start_change_id(100);
request->set_max_results(500);
+ request->set_team_drive_id("TEAM_DRIVE_ID");
request_sender_->StartRequestWithAuthRetry(std::move(request));
run_loop.Run();
}
EXPECT_EQ(HTTP_SUCCESS, error);
EXPECT_EQ(net::test_server::METHOD_GET, http_request_.method);
- EXPECT_EQ("/drive/v2/changes?maxResults=500&startChangeId=100",
- http_request_.relative_url);
+ EXPECT_EQ(
+ "/drive/v2/changes?supportsTeamDrives=true&"
+ "includeTeamDriveItems=true&teamDriveId=TEAM_DRIVE_ID&"
+ "maxResults=500&startChangeId=100",
+ http_request_.relative_url);
EXPECT_TRUE(result);
}
« no previous file with comments | « google_apis/drive/drive_api_requests.cc ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698