mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	add aditional data field to ocs sharees
This commit is contained in:
		
							parent
							
								
									26def4fbe2
								
							
						
					
					
						commit
						90b6ff52f2
					
				| @ -91,5 +91,7 @@ data class ShareeValue( | ||||
|     @Json(name = "shareType") | ||||
|     val shareType: Int?, | ||||
|     @Json(name = "shareWith") | ||||
|     val shareWith: String? | ||||
|     val shareWith: String?, | ||||
|     @Json(name ="shareWithAdditionalInfo") | ||||
|     val additionalInfo: String? | ||||
| ) | ||||
|  | ||||
| @ -68,6 +68,16 @@ class ShareeResponseTest { | ||||
|         assertEquals(1, response?.ocs?.data?.exact?.users?.size) | ||||
|     } | ||||
| 
 | ||||
|     @Test | ||||
|     fun `check structure - ok - user1 contains additional data`() { | ||||
|         assertEquals("user1@user1.com", response?.ocs?.data?.users?.get(0)?.value?.additionalInfo) | ||||
|     } | ||||
| 
 | ||||
|     @Test | ||||
|     fun `check structure - ok - user2 does not contain additional data`() { | ||||
|         assertEquals(null, response!!.ocs.data.users!![1].value!!.additionalInfo) | ||||
|     } | ||||
| 
 | ||||
|     companion object { | ||||
|         val EXAMPLE_RESPONSE = """ | ||||
| { | ||||
| @ -108,7 +118,8 @@ class ShareeResponseTest { | ||||
|                     "label": "user1", | ||||
|                     "value": { | ||||
|                         "shareType": 0, | ||||
|                         "shareWith": "user1" | ||||
|                         "shareWith": "user1", | ||||
|                         "shareWithAdditionalInfo": "user1@user1.com" | ||||
|                     } | ||||
|                 }, | ||||
|                 { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user