Skip to content

Commit 0df4d52

Browse files
authored
Fixed SSR tests (#26)
1 parent c3a5dc8 commit 0df4d52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

inertia/tests/test_ssr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
from inertia.test import InertiaTestCase, inertia_page, inertia_div
23
from django.test import override_settings
34
from unittest.mock import patch, Mock
@@ -24,7 +25,8 @@ def test_it_returns_ssr_calls(self, mock_request):
2425

2526
mock_request.post.assert_called_once_with(
2627
'ssr-url/render',
27-
json=inertia_page('props', props={'name': 'Brandon', 'sport': 'Hockey'}),
28+
data=json.dumps(inertia_page('props', props={'name': 'Brandon', 'sport': 'Hockey'})),
29+
headers={'Content-Type': 'application/json'},
2830
)
2931
self.assertTemplateUsed('inertia_ssr.html')
3032
print(response.content)

0 commit comments

Comments
 (0)