Fakultas Ilmu Komputer UI

Commit 3bb4735a authored by Nurma Ayu Wigati S. Subroto's avatar Nurma Ayu Wigati S. Subroto
Browse files

Merge branch '1906438014-46' into 'master'

[#46] Delete Rating

See merge request !116
parents a987c69c 43bb4812
Pipeline #60725 passed with stages
in 20 minutes and 36 seconds
......@@ -101,6 +101,7 @@
<td>{{ i.score }}</td>
<a href="/edit/{{ i.score }}"><span class="glyphicon glyphicon-pencil" >Edit</span></a>
<a href="/delete/{{ i.score }}"><span class="glyphicon glyphicon-pencil" >Delete</span></a>
{% endfor %}
......@@ -2343,6 +2343,13 @@ class RatingMateriTest(TestCase):
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)
response_json = json.loads(response.content)
Supports Markdown
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