Skip to content

FIX(JPA): Invalid repository configuration in newsletterRepository Interface #684

@tachtwitch

Description

@tachtwitch

Description

The NewsletterRepository interface is extending JpaRepository, but the @Query annotations are not correctly configured.

Expected Behavior

The NewsletterRepository should correctly perform CRUD operations using the defined @Query annotations.

Acceptance Criteria

1. Retrieve newsletters by user ID

  • The NewsletterRepository should be able to retrieve a list of newsletters by user ID.

2. Retrieve newsletters created after a specified date

  • The NewsletterRepository should be able to retrieve a list of newsletters created after a specified date.

3. Delete newsletter by user ID

  • The NewsletterRepository should be able to delete a newsletter by user ID.

Unit Tests

Test 1: Retrieve newsletters by user ID

  • Test method: testFindByUserId
  • Test data: Valid user ID
  • Expected result: List of newsletters associated with the user ID

Test 2: Retrieve newsletters created after a specified date

  • Test method: testFindByCreatedAtAfter
  • Test data: Valid date
  • Expected result: List of newsletters created after the specified date

Test 3: Delete newsletter by user ID

  • Test method: testDeleteByUserId
  • Test data: Valid user ID
  • Expected result: Newsletter deleted successfully

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions