Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: Navigation Version used: 2.8.1 Devices/Android versions reproduced on: N/A
While running unit tests using Robolectric, I see that the properties of my route object are not URL decoded as expected. I tested this running within my app and it does work as expected at runtime.
My Route is something like this:
@Serializable data class MyRoute(val phoneNumber: String)
I am putting the route in the SavedStateHandle for my view model unit test like so:
My view model is getting the route from the savedStateHandle like this:
val route: MyRoute = savedStateHandle.toRoute()
In my tests when I assert the value of
myRoute.phoneNumber
instead of+1 555-867-5309
it comes back as%2B1%20555-867-5309