Header logo should now redirect to learner dashboard. (#20815)

This commit is contained in:
Douglas Hall
2019-06-13 11:07:08 -04:00
committed by GitHub
parent 0978b0e533
commit fc88c55c76
2 changed files with 2 additions and 16 deletions

View File

@@ -587,12 +587,6 @@ def get_about_url():
def get_home_url():
"""
Lookup and return home page url, lookup is performed in the following order
1. return marketing root URL, If marketing is enabled
2. Otherwise return dashboard URL.
Return Dashboard page url
"""
if settings.FEATURES.get('ENABLE_MKTG_SITE', False):
return marketing_link('ROOT')
return reverse('dashboard')

View File

@@ -37,18 +37,10 @@ class TestHeader(TestCase):
self.assertEqual(logo_url, cdn_url)
def test_home_url_with_mktg_disabled(self):
def test_home_url(self):
expected_url = get_home_url()
self.assertEqual(reverse('dashboard'), expected_url)
@mock.patch.dict('django.conf.settings.FEATURES', {'ENABLE_MKTG_SITE': True})
@mock.patch.dict('django.conf.settings.MKTG_URLS', {
"ROOT": "https://edx.org",
})
def test_home_url_with_mktg_enabled(self):
expected_url = get_home_url()
self.assertEqual(marketing_link('ROOT'), expected_url)
class TestFooter(TestCase):
"""Test retrieving the footer. """