@@ -261,42 +261,48 @@ defmodule ApiWeb.RoutePatternControllerTest do
261
261
route_id: "route1" ,
262
262
direction_id: 0 ,
263
263
canonical: true ,
264
- typicality: 5
264
+ typicality: 5 ,
265
+ sort_order: 1
265
266
} ,
266
267
% RoutePattern {
267
268
id: "rp2" ,
268
269
route_id: "route1" ,
269
270
direction_id: 1 ,
270
271
canonical: true ,
271
- typicality: 5
272
+ typicality: 5 ,
273
+ sort_order: 2
272
274
} ,
273
275
% RoutePattern {
274
276
id: "rp3" ,
275
277
route_id: "route2" ,
276
278
direction_id: 0 ,
277
279
canonical: false ,
278
- typicality: 5
280
+ typicality: 5 ,
281
+ sort_order: 3
279
282
} ,
280
283
% RoutePattern {
281
284
id: "rp4" ,
282
285
route_id: "route2" ,
283
286
direction_id: 1 ,
284
287
canonical: false ,
285
- typicality: 5
288
+ typicality: 5 ,
289
+ sort_order: 4
286
290
} ,
287
291
% RoutePattern {
288
292
id: "rp5" ,
289
293
route_id: "route3" ,
290
294
direction_id: 0 ,
291
295
canonical: false ,
292
- typicality: 5
296
+ typicality: 5 ,
297
+ sort_order: 5
293
298
} ,
294
299
% RoutePattern {
295
300
id: "rp6" ,
296
301
route_id: "route3" ,
297
302
direction_id: 1 ,
298
303
canonical: false ,
299
- typicality: 5
304
+ typicality: 5 ,
305
+ sort_order: 6
300
306
}
301
307
]
302
308
end
@@ -336,6 +342,10 @@ defmodule ApiWeb.RoutePatternControllerTest do
336
342
)
337
343
338
344
assert [
345
+ % {
346
+ "id" => "rp3" ,
347
+ "attributes" => % { "direction_id" => 0 , "canonical" => false }
348
+ } ,
339
349
% {
340
350
"id" => "rp4" ,
341
351
"attributes" => % { "direction_id" => 1 , "canonical" => false }
@@ -344,10 +354,6 @@ defmodule ApiWeb.RoutePatternControllerTest do
344
354
"id" => "rp5" ,
345
355
"attributes" => % { "direction_id" => 0 , "canonical" => false }
346
356
} ,
347
- % {
348
- "id" => "rp3" ,
349
- "attributes" => % { "direction_id" => 0 , "canonical" => false }
350
- } ,
351
357
% {
352
358
"id" => "rp6" ,
353
359
"attributes" => % { "direction_id" => 1 , "canonical" => false }
@@ -368,28 +374,28 @@ defmodule ApiWeb.RoutePatternControllerTest do
368
374
369
375
assert [
370
376
% {
371
- "id" => "rp4 " ,
372
- "attributes" => % { "direction_id" => 1 , "canonical" => false }
377
+ "id" => "rp1 " ,
378
+ "attributes" => % { "direction_id" => 0 , "canonical" => true }
373
379
} ,
374
380
% {
375
- "id" => "rp5" ,
381
+ "id" => "rp2" ,
382
+ "attributes" => % { "direction_id" => 1 , "canonical" => true }
383
+ } ,
384
+ % {
385
+ "id" => "rp3" ,
376
386
"attributes" => % { "direction_id" => 0 , "canonical" => false }
377
387
} ,
378
388
% {
379
- "id" => "rp1 " ,
380
- "attributes" => % { "direction_id" => 0 , "canonical" => true }
389
+ "id" => "rp4 " ,
390
+ "attributes" => % { "direction_id" => 1 , "canonical" => false }
381
391
} ,
382
392
% {
383
- "id" => "rp3 " ,
393
+ "id" => "rp5 " ,
384
394
"attributes" => % { "direction_id" => 0 , "canonical" => false }
385
395
} ,
386
396
% {
387
397
"id" => "rp6" ,
388
398
"attributes" => % { "direction_id" => 1 , "canonical" => false }
389
- } ,
390
- % {
391
- "id" => "rp2" ,
392
- "attributes" => % { "direction_id" => 1 , "canonical" => true }
393
399
}
394
400
] = json_response ( conn , 200 ) [ "data" ]
395
401
end
0 commit comments