Skip to content

Commit

Permalink
[WIP] failing test that shows that popular proposals are in the organ…
Browse files Browse the repository at this point in the history
…ization's profile
  • Loading branch information
Felipe Álvarez committed Jun 5, 2017
1 parent da1d7b7 commit 3a7e9cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions organization_profiles/tests/frontend_tests.py
Expand Up @@ -4,6 +4,7 @@
from backend_citizen.models import Profile
from django.core.urlresolvers import reverse
from organization_profiles.models import OrganizationTemplate, ExtraPage
from popular_proposal.models import PopularProposal
from django.test import override_settings


Expand Down Expand Up @@ -177,3 +178,20 @@ def test_extra_pages_in_content(self):
self.assertIn(extra_page.title, content)
self.assertIn(extra_page.slug, content)
self.assertIn(extra_page.content_markdown, content)

def test_proposal_in_content(self):
self.user.organization_template.content = u'{{#each proposals}} {{title}} {{/each}}'
self.user.organization_template.save()

popular_proposal = PopularProposal.objects.create(proposer=self.user,
area=self.arica,
data={"name": "FieraFeroz"},
title=u'This is a title',
clasification=u'education'
)

url = reverse('organization_profiles:home', kwargs={'slug': self.user.username})
response = self.client.get(url) ## Esto es lo que no es unicode
content = response.content.decode('utf-8')

self.assertIn(popular_proposal.title, content)

0 comments on commit 3a7e9cf

Please sign in to comment.