api request AddonCollectionGet serializing test added
@@ -9,6 +9,21 @@ fn serialize_api_request_logout() {
let logout_serialize = serde_json::to_string(&logout).unwrap();
assert_eq!(
logout_json, logout_serialize,
- "logout serialized successfully"
+ "Logout serialized successfully"
+ );
+}
+
+#[test]
+fn serialize_api_request_addon_collection_get() {
+ let addon_collection_get = APIRequest::AddonCollectionGet {
+ auth_key: "auth_key".to_owned(),
+ update: true,
+ };
+ let addon_collection_get_json =
+ r#"{"type":"AddonCollectionGet","authKey":"auth_key","update":true}"#;
+ let addon_collection_get_serialize = serde_json::to_string(&addon_collection_get).unwrap();
+ assert_eq!(
+ addon_collection_get_json, addon_collection_get_serialize,
+ "AddonCollectionGet serialized successfully"
);
}
