Closed danbadge closed 4 years ago
I had this earlier, but for a bool value... I worked around it by specifying the value (not what you want to do here)
@AnthonySteele can probably advise if this is supported
Verified, working on it. https://github.com/AnthonySteele/MvcRouteTester/commit/09c6fc9eee6fef959598a67162ea82573ea6c869
It may be fixed now. Can you try the latest code? If not, I'll package it to nuget.
We've got an optional parameter and we're testing that the route can still be found when the parameter is not passed. Our example controller and test is below, the route works when you make a proper http request but the test fails with the following error: MvcRouteTester.Assertions.AssertionException : Expected '', got missing value for 'shopId' at url '/track/1/format/17/price'.
Here's our controller:
And here's our tests: