From 28ff57df9d8446c1516ec14e7fc9d6c37690b226 Mon Sep 17 00:00:00 2001
From: Martin Burchell <martinb@aptivate.org>
Date: Thu, 23 Jul 2015 11:17:44 +0100
Subject: [PATCH] Added simple test for term name in term count

---
 .../website/rest_api/tests/counts_per_term_tests.py  | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/django/website/rest_api/tests/counts_per_term_tests.py b/django/website/rest_api/tests/counts_per_term_tests.py
index ca556ce4..8c674c90 100644
--- a/django/website/rest_api/tests/counts_per_term_tests.py
+++ b/django/website/rest_api/tests/counts_per_term_tests.py
@@ -75,3 +75,15 @@ def test_term_count_only_contains_terms_in_taxonomy(questions_category,
     assert updates['name'] in names
 
     assert monrovia['name'] not in names
+
+
+@pytest.mark.django_db
+def test_term_count_contains_taxonomy_term_name(questions_category):
+    origin1 = create_item(body="What was the caused of ebola outbreak in liberia?").data
+    origins = add_term(taxonomy=questions_category['slug'], name="Test Origins").data
+    categorize_item(origin1, origins)
+
+    terms = get_term_count(questions_category).data
+    [name] = [term['name'] for term in terms]
+
+    assert origins['name'] == name
-- 
GitLab