Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
remove support link from "Write a Review" page (bug 837829)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvan committed Feb 7, 2013
1 parent 6035838 commit efb8c07
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 42 deletions.
14 changes: 0 additions & 14 deletions mkt/ratings/templates/ratings/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,6 @@
{{ _('Submit review') }}
</button>
</p>
{% if support_url %}
<p class="support-link">
{% trans %}
Visit <a href="{{ support_url }}" target="_blank">support</a>
for assistance with this app.
{% endtrans %}
</p>
{% elif support_email %}
<p class="support-link">
{% trans support_email = emaillink(support_email) %}
Contact {{ support_email }} for assistance with this app.
{% endtrans %}
</p>
{% endif %}
</form>
</section>
{% endblock %}
28 changes: 0 additions & 28 deletions mkt/ratings/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,34 +301,6 @@ def test_add_review_premium_refunded(self):
r = self.client.get(self.add)
eq_(r.status_code, 200)

def test_support_link(self):
# Test no link if no support url or contribution.
r = self.client.get(self.add_mobile)
eq_(pq(r.content)('.support-link').length, 0)

# Test support email if no support url.
self.webapp.support_email = {'en-US': 'test@test.com'}
self.webapp.save()
r = self.client.get(self.add_mobile)
doc = pq(r.content)('.support-link')
eq_(doc.length, 1)

# Test link to support url if support url.
self.webapp.support_url = {'en-US': 'test'}
self.webapp.save()
r = self.client.get(self.add_mobile)
doc = pq(r.content)('.support-link a')
eq_(doc.length, 1)
eq_(doc.attr('href'), 'test')

# Test link to support flow if contribution.
c = Contribution.objects.create(addon=self.webapp, user=self.user,
type=amo.CONTRIB_PURCHASE)
r = self.client.get(self.add_mobile)
doc = pq(r.content)('.support-link a')
eq_(doc.length, 1)
eq_(doc.attr('href'), reverse('support', args=[c.id]))

def test_not_rated(self):
# We don't have any reviews, and I'm not allowed to submit a review.
Review.objects.all().delete()
Expand Down

0 comments on commit efb8c07

Please sign in to comment.