- updating jQuery (1.3.2 -> 1.10.2), jQuery UI, jQuery modules
- [text_view_frame.html] Add some JS driven CSS tricks for iPad
- [text_view_frame.html] move throbber's hiding-call in nested text_view_comments iframe onload signal (so it works with jQuery 1.10.2 and the hiding timing is good)
- [text_view_frame.html][base.html] factorize req_yui.html et req_jquery.html
- [main_tabs][text_tabs][f_client-min.js] rewrite jQuery UI Tabs API calls select in active
- [base.css] CSS fix grey frame appearence for all tabs
- hg remove bgiframe -> not loaded in templates anymore
- hg remove header_custom.html -> the file has been empty since 4 years
- hg remove controls.html -> the file has been empty since 4 years
from django.core import mail
from django.test import TestCase
from django.test.client import Client
from django.core import management
from cm.models import *
from cm.models_utils import *
class NotificationTest(TestCase):
fixtures = ['roles_generic','test_content']
def setUp(self):
pass
def test_simple_notification(self):
c = Client()
c.login(username='user1', password='test')
self.assertEquals(len(Notification.objects.all()), 0)
# subscribe to workspace notifications
response = c.post('/followup/', {'notif_id': u'workspace_notify_check',
'workspace_notify_check': u'true',
})
self.assertEquals(len(Notification.objects.all()), 1)
# subscribe to own notifications
response = c.post('/followup/', {'notif_id': u'own_notify_check',
'own_notify_check': u'true',
})
self.assertEquals(len(Notification.objects.all()), 2)
self.assertEquals(len(mail.outbox), 0)
c.post('/client/', {'content' : 'sdf',
'end_offset' : 19,
'end_wrapper' : 0,
'format' : 'markdown',
'fun' : 'addComment',
'key' : 'text_key_1',
'version_key' : 'textversion_key_1',
'start_offset' : 16,
'start_wrapper' : 0,
'title' : 'sdf',
'tags': '',
})
self.assertEquals(len(mail.outbox), 1)