|
59 | 59 | it { is_expected.to include inertia_div(page) }
|
60 | 60 | end
|
61 | 61 |
|
62 |
| - context 'via a namespaced inertia route' do |
63 |
| - before { get namespaced_inertia_route_path } |
| 62 | + context 'via a resource inertia route' do |
| 63 | + before { get inertia_route_item_path(id: 1) } |
64 | 64 |
|
65 | 65 | it { is_expected.to include inertia_div(page) }
|
66 | 66 | end
|
|
79 | 79 | it { is_expected.to include inertia_div(page) }
|
80 | 80 | end
|
81 | 81 |
|
82 |
| - context 'with a default component namespaced' do |
83 |
| - let(:page) { InertiaRails::Renderer.new('namespaced/inertia_route_with_default_component', controller, request, response, '').send(:page) } |
| 82 | + context 'with a default component resource' do |
| 83 | + let(:page) { InertiaRails::Renderer.new('items/inertia_route_with_default_component', controller, request, response, '').send(:page) } |
84 | 84 |
|
85 |
| - before { get namespaced_inertia_route_with_default_component_path } |
| 85 | + before { get item_inertia_route_with_default_component_path(item_id: 1) } |
86 | 86 |
|
87 | 87 | it { is_expected.to include inertia_div(page) }
|
88 | 88 | end
|
89 | 89 |
|
90 |
| - context 'with a default component namespaced & scoped' do |
91 |
| - let(:page) { InertiaRails::Renderer.new('namespaced/inertia_route_with_default_component', controller, request, response, '').send(:page) } |
| 90 | + context 'with a default component resource on member' do |
| 91 | + let(:page) { InertiaRails::Renderer.new('items/inertia_route_with_default_component_on_member', controller, request, response, '').send(:page) } |
92 | 92 |
|
93 |
| - before { get namespaced_scoped_inertia_route_with_default_component_path } |
| 93 | + before { get inertia_route_with_default_component_on_member_item_path(id: 1) } |
| 94 | + |
| 95 | + it { is_expected.to include inertia_div(page) } |
| 96 | + end |
| 97 | + |
| 98 | + context 'with a default component resource on collection' do |
| 99 | + let(:page) { InertiaRails::Renderer.new('items/inertia_route_with_default_component_on_collection', controller, request, response, '').send(:page) } |
| 100 | + |
| 101 | + before { get inertia_route_with_default_component_on_collection_items_path } |
| 102 | + |
| 103 | + it { is_expected.to include inertia_div(page) } |
| 104 | + end |
| 105 | + |
| 106 | + context 'with a default component resource & scoped' do |
| 107 | + let(:page) { InertiaRails::Renderer.new('items/inertia_route_with_default_component', controller, request, response, '').send(:page) } |
| 108 | + |
| 109 | + before { get scoped_item_inertia_route_with_default_component_path(item_id: 1) } |
94 | 110 |
|
95 | 111 | it { is_expected.to include inertia_div(page) }
|
96 | 112 | end
|
|
0 commit comments