Skip to content

Commit 58b863e

Browse files
committed
Cleanup
1 parent 80a3019 commit 58b863e

File tree

1 file changed

+66
-22
lines changed

1 file changed

+66
-22
lines changed

spec/js_routes/rails_routes_compatibility_spec.rb

Lines changed: 66 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -316,28 +316,72 @@
316316
it "should include the optional parts" do
317317
expectjs("Routes.things_path({optional_id: 5})").to eq(test_routes.things_path(:optional_id => 5))
318318
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+
)
341385

342386
end
343387

0 commit comments

Comments
 (0)