Index: components/drive/resource_entry_conversion_unittest.cc |
diff --git a/components/drive/resource_entry_conversion_unittest.cc b/components/drive/resource_entry_conversion_unittest.cc |
index f5e93f59f942a0b360ff37f5d9f8d65ef90a3244..5b0cc8094f9b5450d1e98a18f9c998ed5e3f3e13 100644 |
--- a/components/drive/resource_entry_conversion_unittest.cc |
+++ b/components/drive/resource_entry_conversion_unittest.cc |
@@ -393,4 +393,30 @@ TEST(ResourceEntryConversionTest, |
} |
} |
+TEST(ResourceEntryConversionTest, |
+ ConvertTeamDriveChangeResourceToResourceEntry) { |
+ google_apis::ChangeResource change_resource; |
+ change_resource.set_type(google_apis::ChangeResource::TEAM_DRIVE); |
+ change_resource.set_team_drive( |
+ base::WrapUnique(new google_apis::TeamDriveResource)); |
+ change_resource.set_team_drive_id("team_drive_id"); |
+ change_resource.set_modification_date(GetTestTime()); |
+ change_resource.set_deleted(false); |
+ |
+ google_apis::TeamDriveResource* team_drive_resource = |
+ change_resource.mutable_team_drive(); |
+ team_drive_resource->set_name("ABC Team Drive"); |
+ team_drive_resource->set_id("team_drive_id"); |
+ |
+ ResourceEntry team_drive_change; |
+ EXPECT_TRUE(ConvertTeamDriveChangeResourceToResourceEntry( |
+ change_resource, &team_drive_change)); |
+ |
+ EXPECT_EQ(change_resource.team_drive_id(), team_drive_change.resource_id()); |
+ EXPECT_EQ(team_drive_resource->name(), team_drive_change.title()); |
+ EXPECT_EQ(change_resource.modification_date().ToInternalValue(), |
+ team_drive_change.modification_date()); |
+ EXPECT_FALSE(team_drive_change.deleted()); |
+} |
+ |
} // namespace drive |