Header logo should now redirect to learner dashboard. (#20815)
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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. """
|
||||
|
||||
Reference in New Issue
Block a user