|
316 | 316 | it "should include the optional parts" do |
317 | 317 | expectjs("Routes.things_path({optional_id: 5})").to eq(test_routes.things_path(:optional_id => 5)) |
318 | 318 | expectjs("Routes.things_path(5)").to eq(test_routes.things_path(5)) |
319 | | - expectjs("Routes.thing_deep_path(1, { third_required: 3, second_required: 2 })").to eq(test_routes.thing_deep_path(1, third_required: 3, second_required: 2)) |
320 | | - expectjs("Routes.thing_deep_path(1, { third_required: 3, second_required: 2, forth_optional: 4 })").to eq(test_routes.thing_deep_path(1, third_required: 3, second_required: 2, forth_optional: 4)) |
321 | | - expectjs("Routes.thing_deep_path(2, { third_required: 3, first_optional: 1 })").to eq(test_routes.thing_deep_path(2, third_required: 3, first_optional: 1)) |
322 | | - expectjs("Routes.thing_deep_path(3, { first_optional: 1, second_required: 2 })").to eq(test_routes.thing_deep_path(3, first_optional: 1, second_required: 2)) |
323 | | - expectjs("Routes.thing_deep_path(3, { first_optional: 1, second_required: 2, forth_optional: 4 })").to eq(test_routes.thing_deep_path(3, first_optional: 1, second_required: 2, forth_optional: 4)) |
324 | | - expectjs("Routes.thing_deep_path(4, { first_optional: 1, second_required: 2, third_required: 3 })").to eq(test_routes.thing_deep_path(4, first_optional: 1, second_required: 2, third_required: 3)) |
325 | | - expectjs("Routes.thing_deep_path(2, 3)").to eq(test_routes.thing_deep_path(2, 3)) |
326 | | - expectjs("Routes.thing_deep_path(1, 2, { third_required: 3 })").to eq(test_routes.thing_deep_path(1, 2, third_required: 3)) |
327 | | - expectjs("Routes.thing_deep_path(1,2, {third_required: 3, q: 'bogdan'})").to eq(test_routes.thing_deep_path(1,2, {third_required: 3, q: 'bogdan'})) |
328 | | - expectjs("Routes.thing_deep_path(1, 2, { forth_optional: 4, third_required: 3 })").to eq(test_routes.thing_deep_path(1, 2, forth_optional: 4, third_required: 3)) |
329 | | - expectjs("Routes.thing_deep_path(1, 3, { second_required: 2 })").to eq(test_routes.thing_deep_path(1, 3, second_required: 2)) |
330 | | - expectjs("Routes.thing_deep_path(1, 4, { second_required: 2, third_required: 3 })").to eq(test_routes.thing_deep_path(1, 4, second_required: 2, third_required: 3)) |
331 | | - expectjs("Routes.thing_deep_path(2, 3, { first_optional: 1 })").to eq(test_routes.thing_deep_path(2, 3, first_optional: 1)) |
332 | | - expectjs("Routes.thing_deep_path(2, 3, { first_optional: 1, forth_optional: 4 })").to eq(test_routes.thing_deep_path(2, 3, first_optional: 1, forth_optional: 4)) |
333 | | - expectjs("Routes.thing_deep_path(2, 4, { first_optional: 1, third_required: 3 })").to eq(test_routes.thing_deep_path(2, 4, first_optional: 1, third_required: 3)) |
334 | | - expectjs("Routes.thing_deep_path(3, 4, { first_optional: 1, second_required: 2 })").to eq(test_routes.thing_deep_path(3, 4, first_optional: 1, second_required: 2)) |
335 | | - expectjs("Routes.thing_deep_path(1, 2, 3)").to eq(test_routes.thing_deep_path(1, 2, 3)) |
336 | | - expectjs("Routes.thing_deep_path(1, 2, 3, { forth_optional: 4 })").to eq(test_routes.thing_deep_path(1, 2, 3, forth_optional: 4)) |
337 | | - expectjs("Routes.thing_deep_path(1, 2, 4, { third_required: 3 })").to eq(test_routes.thing_deep_path(1, 2, 4, third_required: 3)) |
338 | | - expectjs("Routes.thing_deep_path(1, 3, 4, { second_required: 2 })").to eq(test_routes.thing_deep_path(1, 3, 4, second_required: 2)) |
339 | | - expectjs("Routes.thing_deep_path(2, 3, 4, { first_optional: 1 })").to eq(test_routes.thing_deep_path(2, 3, 4, first_optional: 1)) |
340 | | - expectjs("Routes.thing_deep_path(1, 2, 3, 4)").to eq(test_routes.thing_deep_path(1, 2, 3, 4)) |
| 319 | + expectjs("Routes.thing_deep_path(1, { third_required: 3, second_required: 2 })").to eq( |
| 320 | + test_routes.thing_deep_path(1, third_required: 3, second_required: 2) |
| 321 | + ) |
| 322 | + expectjs("Routes.thing_deep_path(1, { third_required: 3, second_required: 2, forth_optional: 4 })").to eq( |
| 323 | + test_routes.thing_deep_path(1, third_required: 3, second_required: 2, forth_optional: 4) |
| 324 | + ) |
| 325 | + expectjs("Routes.thing_deep_path(2, { third_required: 3, first_optional: 1 })").to eq( |
| 326 | + test_routes.thing_deep_path(2, third_required: 3, first_optional: 1) |
| 327 | + ) |
| 328 | + expectjs("Routes.thing_deep_path(3, { first_optional: 1, second_required: 2 })").to eq( |
| 329 | + test_routes.thing_deep_path(3, first_optional: 1, second_required: 2) |
| 330 | + ) |
| 331 | + expectjs("Routes.thing_deep_path(3, { first_optional: 1, second_required: 2, forth_optional: 4 })").to eq( |
| 332 | + test_routes.thing_deep_path(3, first_optional: 1, second_required: 2, forth_optional: 4) |
| 333 | + ) |
| 334 | + expectjs("Routes.thing_deep_path(4, { first_optional: 1, second_required: 2, third_required: 3 })").to eq( |
| 335 | + test_routes.thing_deep_path(4, first_optional: 1, second_required: 2, third_required: 3) |
| 336 | + ) |
| 337 | + expectjs("Routes.thing_deep_path(2, 3)").to eq( |
| 338 | + test_routes.thing_deep_path(2, 3) |
| 339 | + ) |
| 340 | + expectjs("Routes.thing_deep_path(1, 2, { third_required: 3 })").to eq( |
| 341 | + test_routes.thing_deep_path(1, 2, third_required: 3) |
| 342 | + ) |
| 343 | + expectjs("Routes.thing_deep_path(1,2, {third_required: 3, q: 'bogdan'})").to eq( |
| 344 | + test_routes.thing_deep_path(1,2, {third_required: 3, q: 'bogdan'}) |
| 345 | + ) |
| 346 | + expectjs("Routes.thing_deep_path(1, 2, { forth_optional: 4, third_required: 3 })").to eq( |
| 347 | + test_routes.thing_deep_path(1, 2, forth_optional: 4, third_required: 3) |
| 348 | + ) |
| 349 | + expectjs("Routes.thing_deep_path(1, 3, { second_required: 2 })").to eq( |
| 350 | + test_routes.thing_deep_path(1, 3, second_required: 2) |
| 351 | + ) |
| 352 | + expectjs("Routes.thing_deep_path(1, 4, { second_required: 2, third_required: 3 })").to eq( |
| 353 | + test_routes.thing_deep_path(1, 4, second_required: 2, third_required: 3) |
| 354 | + ) |
| 355 | + expectjs("Routes.thing_deep_path(2, 3, { first_optional: 1 })").to eq( |
| 356 | + test_routes.thing_deep_path(2, 3, first_optional: 1) |
| 357 | + ) |
| 358 | + expectjs("Routes.thing_deep_path(2, 3, { first_optional: 1, forth_optional: 4 })").to eq( |
| 359 | + test_routes.thing_deep_path(2, 3, first_optional: 1, forth_optional: 4) |
| 360 | + ) |
| 361 | + expectjs("Routes.thing_deep_path(2, 4, { first_optional: 1, third_required: 3 })").to eq( |
| 362 | + test_routes.thing_deep_path(2, 4, first_optional: 1, third_required: 3) |
| 363 | + ) |
| 364 | + expectjs("Routes.thing_deep_path(3, 4, { first_optional: 1, second_required: 2 })").to eq( |
| 365 | + test_routes.thing_deep_path(3, 4, first_optional: 1, second_required: 2) |
| 366 | + ) |
| 367 | + expectjs("Routes.thing_deep_path(1, 2, 3)").to eq( |
| 368 | + test_routes.thing_deep_path(1, 2, 3) |
| 369 | + ) |
| 370 | + expectjs("Routes.thing_deep_path(1, 2, 3, { forth_optional: 4 })").to eq( |
| 371 | + test_routes.thing_deep_path(1, 2, 3, forth_optional: 4) |
| 372 | + ) |
| 373 | + expectjs("Routes.thing_deep_path(1, 2, 4, { third_required: 3 })").to eq( |
| 374 | + test_routes.thing_deep_path(1, 2, 4, third_required: 3) |
| 375 | + ) |
| 376 | + expectjs("Routes.thing_deep_path(1, 3, 4, { second_required: 2 })").to eq( |
| 377 | + test_routes.thing_deep_path(1, 3, 4, second_required: 2) |
| 378 | + ) |
| 379 | + expectjs("Routes.thing_deep_path(2, 3, 4, { first_optional: 1 })").to eq( |
| 380 | + test_routes.thing_deep_path(2, 3, 4, first_optional: 1) |
| 381 | + ) |
| 382 | + expectjs("Routes.thing_deep_path(1, 2, 3, 4)").to eq( |
| 383 | + test_routes.thing_deep_path(1, 2, 3, 4) |
| 384 | + ) |
341 | 385 |
|
342 | 386 | end |
343 | 387 |
|
|
0 commit comments