File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
servant-server/test/Servant/Server Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ distributivitySpec =
49
49
dynamic `shouldHaveSameStructureAs` dynamicRef
50
50
it " properly reorders permuted static paths" $ do
51
51
permute `shouldHaveSameStructureAs` permuteRef
52
+ it " properly reorders permuted static paths in the presence of QueryParams" $ do
53
+ permuteQuery `shouldHaveSameStructureAs` permuteRef
52
54
it " properly reorders permuted static paths in the presence of Raw in end" $ do
53
55
permuteRawEnd `shouldHaveSameStructureAs` permuteRawEndRef
54
56
it " properly reorders permuted static paths in the presence of Raw in beginning" $ do
@@ -154,6 +156,19 @@ permute = Proxy
154
156
permuteRef :: Proxy PermuteRef
155
157
permuteRef = Proxy
156
158
159
+ -- Adding a "QueryParam" should not affect structure
160
+
161
+ type PermuteQuery =
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
168
+
169
+ permuteQuery :: Proxy PermuteQuery
170
+ permuteQuery = Proxy
171
+
157
172
-- Adding a 'Raw' in one of the ends should have minimal
158
173
-- effect on the grouping.
159
174
You can’t perform that action at this time.
0 commit comments