Add test case for the `|` token in Journey scanner

Journey's scanner tokenizes the `|` (:OR) operator when scanning route
urls such as `"/:foo|*bar"`. However, the current scanner test does not
have any test cases for the `|` operator. This commit adds a test case
for this particular token.
This commit is contained in:
vaidehijoshi 2018-06-18 09:32:23 -07:00
parent c47c289ac0
commit 3928e52bf8
1 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,12 @@ module ActionDispatch
["/~page", [[:SLASH, "/"], [:LITERAL, "~page"]]],
["/pa-ge", [[:SLASH, "/"], [:LITERAL, "pa-ge"]]],
["/:page", [[:SLASH, "/"], [:SYMBOL, ":page"]]],
["/:page|*foo", [
[:SLASH, "/"],
[:SYMBOL, ":page"],
[:OR, "|"],
[:STAR, "*foo"]
]],
["/(:page)", [
[:SLASH, "/"],
[:LPAREN, "("],