mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	pleasure the linter
This commit is contained in:
		
							parent
							
								
									196018fa6b
								
							
						
					
					
						commit
						40359e342e
					
				| @ -48,8 +48,8 @@ internal class StatusRequester { | ||||
|     fun updateLocationWithRedirectPath(oldLocation: String, redirectedLocation: String): String { | ||||
|         if (!redirectedLocation.startsWith("/")) | ||||
|             return redirectedLocation | ||||
|         val oldLocation = URL(oldLocation) | ||||
|         return URL(oldLocation.protocol, oldLocation.host, oldLocation.port, redirectedLocation).toString() | ||||
|         val oldLocationURL = URL(oldLocation) | ||||
|         return URL(oldLocationURL.protocol, oldLocationURL.host, oldLocationURL.port, redirectedLocation).toString() | ||||
|     } | ||||
| 
 | ||||
|     private fun getGetMethod(url: String): GetMethod { | ||||
|  | ||||
| @ -33,7 +33,7 @@ class StatusRequestorTest { | ||||
| 
 | ||||
|     @Test | ||||
|     fun `update location with an absolute path`() { | ||||
|         val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, "$TEST_DOMAIN/subdir") | ||||
|         val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, "$TEST_DOMAIN$SUB_PATH") | ||||
|         assertEquals("$TEST_DOMAIN$SUB_PATH", newLocation) | ||||
|     } | ||||
| 
 | ||||
| @ -46,9 +46,7 @@ class StatusRequestorTest { | ||||
| 
 | ||||
|     @Test | ||||
|     fun `update location with a relative path`() { | ||||
|         val newLocation = requestor.updateLocationWithRedirectPath( | ||||
|             TEST_DOMAIN, SUB_PATH | ||||
|         ) | ||||
|         val newLocation = requestor.updateLocationWithRedirectPath(TEST_DOMAIN, SUB_PATH) | ||||
|         assertEquals("$TEST_DOMAIN$SUB_PATH", newLocation) | ||||
|     } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user