Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ietf/secr/telechat/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
IndividualDraftFactory, ConflictReviewFactory)
from ietf.doc.models import BallotDocEvent, BallotType, BallotPositionDocEvent, State, Document
from ietf.doc.utils import update_telechat, create_ballot_if_not_open
from ietf.meeting.factories import MeetingFactory
from ietf.utils.test_utils import TestCase
from ietf.utils.timezone import date_today, datetime_today
from ietf.iesg.models import TelechatDate
Expand All @@ -25,6 +26,26 @@
def augment_data():
TelechatDate.objects.create(date=date_today())

class SecrUrlTests(TestCase):
def test_urls(self):
MeetingFactory(type_id='ietf', date=date_today())

# check public options
response = self.client.get("/secr/")
self.assertEqual(response.status_code, 200)
q = PyQuery(response.content)
links = q('div.secr-menu a')
self.assertEqual(len(links), 1)
self.assertEqual(PyQuery(links[0]).text(), 'Announcements')

# check secretariat only options
self.client.login(username="secretary", password="secretary+password")
response = self.client.get("/secr/")
self.assertEqual(response.status_code, 200)
q = PyQuery(response.content)
links = q('div.secr-menu a')
self.assertEqual(len(links), 4)

class SecrTelechatTestCase(TestCase):
def test_main(self):
"Main Test"
Expand Down
2 changes: 1 addition & 1 deletion ietf/secr/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block title %}Secretariat Dashboard{% endblock %}
{% block content %}
<h1>Secretariat Dashboard</h1>
<div class="">
<div class="secr-menu">
{% if user|has_role:"Secretariat" %}
<h2>IESG</h2>
<ul>
Expand Down