@@ -49,6 +49,8 @@ distributivitySpec =
49 dynamic `shouldHaveSameStructureAs` dynamicRef
49 dynamic `shouldHaveSameStructureAs` dynamicRef
50 it "properly reorders permuted static paths" $ do
50 it "properly reorders permuted static paths" $ do
51 permute `shouldHaveSameStructureAs` permuteRef
51 permute `shouldHaveSameStructureAs` permuteRef
52+ it "properly reorders permuted static paths in the presence of QueryParams" $ do
53+ permuteQuery `shouldHaveSameStructureAs` permuteRef
52 it "properly reorders permuted static paths in the presence of Raw in end" $ do
54 it "properly reorders permuted static paths in the presence of Raw in end" $ do
53 permuteRawEnd `shouldHaveSameStructureAs` permuteRawEndRef
55 permuteRawEnd `shouldHaveSameStructureAs` permuteRawEndRef
54 it "properly reorders permuted static paths in the presence of Raw in beginning" $ do
56 it "properly reorders permuted static paths in the presence of Raw in beginning" $ do
@@ -154,6 +156,19 @@ permute = Proxy
154permuteRef :: Proxy PermuteRef
156permuteRef :: Proxy PermuteRef
155permuteRef = Proxy
157permuteRef = Proxy
159+-- Adding a "QueryParam" should not affect structure
162+ QueryParam "1" Int :> "a" :> "b" :> "c" :> End
163+ :<|> QueryParam "2" Int :> "b" :> "a" :> "c" :> End
164+ :<|> QueryParam "3" Int :> "a" :> "c" :> "b" :> End
165+ :<|> QueryParam "4" Int :> "c" :> "a" :> "b" :> End
166+ :<|> QueryParam "5" Int :> "b" :> "c" :> "a" :> End
167+ :<|> QueryParam "6" Int :> "c" :> "b" :> "a" :> End
169+permuteQuery :: Proxy PermuteQuery
157-- Adding a 'Raw' in one of the ends should have minimal
172-- Adding a 'Raw' in one of the ends should have minimal
158-- effect on the grouping.
173-- effect on the grouping.