Add spec test for URL encoding