Merge pull request #41 from sartography/user-lookup-fix

fix for user lookup stuff.
This commit is contained in:
Dan Funk 2021-02-23 14:41:33 -05:00 committed by GitHub
commit 8a009522c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -52,7 +52,7 @@ $(document).ready(function () {
function SearchLDAP(event) {
let current_val = $('#NETBADGEID').val();
let url = {{ base_href }} + "/search_ldap/" + current_val;
let url = "{{base_href}}/search_ldap/" + current_val;
$.ajax({
url: url,

View File

@ -59,9 +59,9 @@
function selectStudies() {
let uva_id = document.getElementById('uva_id').value;
if (uva_id == 'all') {
window.location.href = '/'
window.location.href = "{{base_href}}/";
} else {
window.location.href = "/user_studies/" + uva_id;
window.location.href = "{{base_href}}/user_studies/" + uva_id;
}
}
</script>

View File

@ -152,12 +152,12 @@ class Sanity_Check_Test(unittest.TestCase):
self.assertEqual('308 PERMANENT REDIRECT', studies1.status)
for header in studies1.headers:
if header[0] == 'Location':
self.assertEqual('http://localhost/user_studies/', header[1])
self.assertIn('user_studies', header[1])
studies2 = self.app.get(f'/user_studies/')
self.assertEqual('302 FOUND', studies2.status)
for header in studies2.headers:
if header[0] == 'Location':
self.assertEqual('http://localhost/', header[1])
self.assertNotIn('user_studies', header[1])
def test_long_study_name(self):
title = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla egestas quam id ullamcorper facilisis. Praesent ultricies urna malesuada velit ultricies efficitur. Nam eu eleifend libero. Mauris ac erat augue. Curabitur ac fringilla tellus. Morbi sem quam, consectetur sit amet eros non, semper congue metus. Sed sollicitudin augue eu justo fermentum volutpat at sit amet metus. Vestibulum hendrerit pharetra ante. Sed porttitor diam nibh, quis elementum est placerat sit amet. Phasellus magna libero, porta quis euismod et, commodo eu nisl. Quisque consectetur sagittis interdum. Nullam congue consectetur elementum. In hac habitasse platea dictumst. Duis placerat iaculis odio, ac faucibus felis vehicula nec. Praesent cursus id turpis ac maximus.'