|
4 | 4 | let(:controller) { double('Controller', inertia_view_assigns: {})}
|
5 | 5 |
|
6 | 6 | context 'first load' do
|
7 |
| - let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: nil, view_data: nil, deep_merge: nil).send(:page) } |
| 7 | + let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '').send(:page) } |
8 | 8 |
|
9 | 9 | context 'with props' do
|
10 |
| - let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: {name: 'Brandon', sport: 'hockey'}, view_data: nil, deep_merge: nil).send(:page) } |
| 10 | + let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: {name: 'Brandon', sport: 'hockey'}).send(:page) } |
11 | 11 | before { get props_path }
|
12 | 12 |
|
13 | 13 | it { is_expected.to include inertia_div(page) }
|
|
39 | 39 | end
|
40 | 40 |
|
41 | 41 | context 'subsequent requests' do
|
42 |
| - let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: {name: 'Brandon', sport: 'hockey'}, view_data: nil, deep_merge: nil).send(:page) } |
| 42 | + let(:page) { InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: {name: 'Brandon', sport: 'hockey'}).send(:page) } |
43 | 43 | let(:headers) { {'X-Inertia' => true} }
|
44 | 44 |
|
45 | 45 | before { get props_path, headers: headers }
|
|
64 | 64 |
|
65 | 65 | context 'partial rendering' do
|
66 | 66 | let (:page) {
|
67 |
| - InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { sport: 'hockey'}, view_data: nil, deep_merge: nil).send(:page) |
| 67 | + InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { sport: 'hockey'}).send(:page) |
68 | 68 | }
|
69 | 69 | let(:headers) {{
|
70 | 70 | 'X-Inertia' => true,
|
|
94 | 94 | context 'lazy prop rendering' do
|
95 | 95 | context 'on first load' do
|
96 | 96 | let (:page) {
|
97 |
| - InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { name: 'Brian'}, view_data: nil, deep_merge: nil).send(:page) |
| 97 | + InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { name: 'Brian'}).send(:page) |
98 | 98 | }
|
99 | 99 | before { get lazy_props_path }
|
100 | 100 |
|
|
103 | 103 |
|
104 | 104 | context 'with a partial reload' do
|
105 | 105 | let (:page) {
|
106 |
| - InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { sport: 'basketball', level: 'worse than he believes', grit: 'intense'}, view_data: nil, deep_merge: nil).send(:page) |
| 106 | + InertiaRails::Renderer.new('TestComponent', controller, request, response, '', props: { sport: 'basketball', level: 'worse than he believes', grit: 'intense'}).send(:page) |
107 | 107 | }
|
108 | 108 | let(:headers) {{
|
109 | 109 | 'X-Inertia' => true,
|
|
0 commit comments