Fix to return only enabled content types via the new config/types API

- Previously was return all core content types even if they had not been
  setup
- Add test to validate only configured content types are returned by
  the api/config/types API endpoint
This commit is contained in:
Debanjum Singh Solanky
2023-02-28 22:08:26 -06:00
parent b177adf3a7
commit b09350c052
2 changed files with 11 additions and 1 deletions

View File

@@ -76,6 +76,16 @@ def test_regenerate_with_valid_content_type(client):
assert response.status_code == 200
# ----------------------------------------------------------------------------------------------------
def test_get_configured_types_via_api(client):
# Act
response = client.get(f"/api/config/types")
# Assert
assert response.status_code == 200
assert response.json() == ["org", "image", "plugin1"]
# ----------------------------------------------------------------------------------------------------
def test_image_search(client, content_config: ContentConfig, search_config: SearchConfig):
# Arrange