From cedd7f254a7e349b06c86db96d57e53888240f16 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 19 Aug 2024 09:25:42 -0600 Subject: [PATCH] Fix middleware test --- src/registrar/tests/test_views_portfolio.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index 3097c8e5c..38f6bf4fa 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -97,8 +97,8 @@ class TestPortfolio(WebTest): self.assertNotContains(portfolio_page, self.portfolio.organization_name) @less_console_noise_decorator - def test_middleware_redirects_to_portfolio_organization_page(self): - """Test that user with a portfolio and VIEW_PORTFOLIO is redirected to portfolio organization page""" + def test_middleware_redirects_to_portfolio_no_domains_page(self): + """Test that user with a portfolio and VIEW_PORTFOLIO is redirected to the no domains page""" self.app.set_user(self.user.username) self.user.portfolio = self.portfolio self.user.portfolio_additional_permissions = [UserPortfolioPermissionChoices.VIEW_PORTFOLIO] @@ -110,7 +110,8 @@ class TestPortfolio(WebTest): portfolio_page = self.app.get(reverse("home")).follow() # Assert that we're on the right page self.assertContains(portfolio_page, self.portfolio.organization_name) - self.assertContains(portfolio_page, "