-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Part of the query is removed when URL is passed in Intent (#344)
* Reproduced failing test Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me> * Fixed stripUrl Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me> --------- Signed-off-by: Arnau Mora Gras <arnyminerz@proton.me>
- Loading branch information
1 parent
dde075d
commit 3acbdfc
Showing
3 changed files
with
34 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package at.bitfire.icsdroid | ||
|
||
import at.bitfire.icsdroid.UriUtils.stripUrl | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
|
||
class UrlUtilsTest { | ||
@Test | ||
fun testStripUrl() { | ||
val url = "This is a URL: https://example.com/more/and/more?query=true.&par_am=test.more" | ||
val strippedUrl = url.stripUrl() | ||
assertEquals("https://example.com/more/and/more?query=true.&par_am=test.more", strippedUrl) | ||
} | ||
} |