Commit 2efb486 1 parent 06a639b commit 2efb486 Copy full SHA for 2efb486
File tree 1 file changed +21
-0
lines changed
backend/src/openarchiefbeheer/config/tests
1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -190,3 +190,24 @@ def test_health_check(self):
190
190
191
191
self .assertEqual (response .status_code , status .HTTP_200_OK )
192
192
self .assertFalse (response .json ()["success" ])
193
+
194
+
195
+ @override_settings (RELEASE = "1.0.0" , GIT_SHA = "123" )
196
+ class ApplicationInfoTests (APITestCase ):
197
+ def test_not_logged_in (self ):
198
+ response = self .client .get (reverse ("api:app-info" ))
199
+
200
+ self .assertEqual (response .status_code , status .HTTP_403_FORBIDDEN )
201
+
202
+ def test_get_app_info (self ):
203
+ user = UserFactory .create ()
204
+ self .client .force_login (user )
205
+
206
+ response = self .client .get (reverse ("api:app-info" ))
207
+
208
+ self .assertEqual (response .status_code , status .HTTP_200_OK )
209
+
210
+ data = response .json ()
211
+
212
+ self .assertEqual (data ["release" ], "1.0.0" )
213
+ self .assertEqual (data ["gitSha" ], "123" )
You can’t perform that action at this time.
0 commit comments