##// END OF EJS Templates
Update minified YUI to version 2.9 built from Source....
Update minified YUI to version 2.9 built from Source. yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated it to something else and applied more aggresive minification. We stick to a clean but minified version 2.9. The license of YUI is BSD 3-clause, as described on http://yuilibrary.com/license/ . Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd compliant to distribute this Object Code version with the Corresponding Source (or offer therefor). This yui.2.9.js is built from Source this way: git clone https://github.com/yui/builder git clone https://github.com/yui/yui2 cd yui2/ git checkout hudson-yui2-2800 ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing rm -f tmp.js for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js done java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js The source is mirrored and available on https://kallithea-scm.org/repos/mirror .

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4131:31f510a8 rhodecode-2.2.5-gpl
Show More
test_admin_notifications.py
91 lines | 3.9 KiB | text/x-python | PythonLexer
/ rhodecode / tests / functional / test_admin_notifications.py
Notification system improvements...
r1712 from rhodecode.tests import *
Added functional test create repo with a group...
r2529 from rhodecode.model.db import Notification, User
Notification system improvements...
r1712
from rhodecode.model.user import UserModel
from rhodecode.model.notification import NotificationModel
synced vcs with upstream...
r3797 from rhodecode.model.meta import Session
Notification system improvements...
r1712
Updated create_or_update method to not change API key when password is not updated
r2513
Notification system improvements...
r1712 class TestNotificationsController(TestController):
Tests updates, Session refactoring
r1713 def tearDown(self):
for n in Notification.query().all():
inst = Notification.get(n.notification_id)
synced vcs with upstream...
r3797 Session().delete(inst)
Session().commit()
Tests updates, Session refactoring
r1713
Notification system improvements...
r1712 def test_index(self):
self.log_user()
u1 = UserModel().create_or_update(username='u1', password='qweqwe',
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 email='u1@rhodecode.org',
firstname='u1', lastname='u1')
Updated create_or_update method to not change API key when password is not updated
r2513 u1 = u1.user_id
Notification system improvements...
r1712
response = self.app.get(url('notifications'))
Use only mustcontain for testing response body
r3646 response.mustcontain('<div class="table">No notifications here yet</div>')
Notification system improvements...
r1712
cur_user = self._get_logged_user()
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 notif = NotificationModel().create(created_by=u1, subject=u'test_notification_1',
body=u'notification_1', recipients=[cur_user])
synced vcs with upstream...
r3797 Session().commit()
Notification system improvements...
r1712 response = self.app.get(url('notifications'))
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 response.mustcontain('id="notification_%s"' % notif.notification_id)
Notification system improvements...
r1712
def test_delete(self):
self.log_user()
cur_user = self._get_logged_user()
u1 = UserModel().create_or_update(username='u1', password='qweqwe',
email='u1@rhodecode.org',
Updated create_or_update method to not change API key when password is not updated
r2513 firstname='u1', lastname='u1')
Notification system improvements...
r1712 u2 = UserModel().create_or_update(username='u2', password='qweqwe',
email='u2@rhodecode.org',
Updated create_or_update method to not change API key when password is not updated
r2513 firstname='u2', lastname='u2')
Notification system improvements...
r1712
Tests updates, Session refactoring
r1713 # make notifications
Notification system improvements...
r1712 notification = NotificationModel().create(created_by=cur_user,
subject=u'test',
body=u'hi there',
recipients=[cur_user, u1, u2])
synced vcs with upstream...
r3797 Session().commit()
Notification system improvements...
r1712 u1 = User.get(u1.user_id)
u2 = User.get(u2.user_id)
# check DB
Updated create_or_update method to not change API key when password is not updated
r2513 get_notif = lambda un: [x.notification for x in un]
Tests updates, Session refactoring
r1713 self.assertEqual(get_notif(cur_user.notifications), [notification])
self.assertEqual(get_notif(u1.notifications), [notification])
self.assertEqual(get_notif(u2.notifications), [notification])
Notification system improvements...
r1712 cur_usr_id = cur_user.user_id
Tests updates, Session refactoring
r1713
response = self.app.delete(url('notification',
notification_id=
notification.notification_id))
Mads Kiilerich
access control: fix owner checks - they were always true...
r3141 self.assertEqual(response.body, 'ok')
Notification system improvements...
r1712
Tests updates, Session refactoring
r1713 cur_user = User.get(cur_usr_id)
self.assertEqual(cur_user.notifications, [])
Notification system improvements...
r1712
def test_show(self):
self.log_user()
cur_user = self._get_logged_user()
u1 = UserModel().create_or_update(username='u1', password='qweqwe',
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 email='u1@rhodecode.org',
firstname='u1', lastname='u1')
Notification system improvements...
r1712 u2 = UserModel().create_or_update(username='u2', password='qweqwe',
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 email='u2@rhodecode.org',
firstname='u2', lastname='u2')
Notification system improvements...
r1712
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 subject = u'test'
notif_body = u'hi there'
Notification system improvements...
r1712 notification = NotificationModel().create(created_by=cur_user,
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 subject=subject,
body=notif_body,
Notification system improvements...
r1712 recipients=[cur_user, u1, u2])
response = self.app.get(url('notification',
notification_id=notification.notification_id))
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116
response.mustcontain(subject)
response.mustcontain(notif_body)