Skip to content

Unit Tests for the Blog Section #16

@VibhuSahu

Description

@VibhuSahu

Description

Add unit tests for the blog section using JUnit 5 and Mockito. Current implementation lacks coverage for blog creation, retrieval, and integration (e.g., CMS), which may lead to rendering and data issues.

Tasks

  • Set up test configuration for JUnit 5
  • Mock dependencies using Mockito
  • Write unit tests for blog APIs/controllers
  • Test blog creation, update, and deletion (CRUD)
  • Test fetching blog list and individual blog
  • Validate content structure (title, body, metadata)
  • Test pagination and filtering (if applicable)
  • Mock external CMS API responses (if using Notion)
  • Test error handling and edge cases
  • Ensure good test coverage

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-mediumNormalblogBlog content creation, editing, and display pagesmockingMockitosecurityVulnerability and Secretsunit-testJUnit 5
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions