Fakultas Ilmu Komputer UI

Commit 646eac87 authored by Nurma Ayu Wigati S. Subroto's avatar Nurma Ayu Wigati S. Subroto
Browse files

[#46] Delete Rating

parent eb882e5f
Pipeline #60723 passed with stages
in 20 minutes and 37 seconds
......@@ -2342,6 +2342,13 @@ class RatingMateriTest(TestCase):
def test_rating_materi_url_use_edit_rating_materi_function(self):
found = resolve(self.url_rate)
self.assertEqual(found.func, add_rating_materi)
def test_rating_materi_url_use_delete_rating_materi_function(self):
response = self.client.get(self.url_rate)
response_json = json.loads(response.content)
self.assertEqual(response_json.get("success", None), False)
self.assertEqual(response_json.get("msg", None), "Forbidden")
self.assertEqual(response.status_code, 403)
def test_rating_materi_get_method_should_return_403_forbidden(self):
response = self.client.get(self.url_rate)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment