Skip to content

Add integration test for the post delete endpoint removing the post and rejecting deletion by a non-owner #736

Description

@Chucks1093

Summary

A creator should be able to delete their own posts, but another wallet must not be able to delete a post they did not author. An integration test should confirm the deletion succeeds for the owner and is rejected for everyone else.

Scope

  • Seed a post authored by creator A
  • DELETE the post as creator A and assert 204 is returned
  • Assert the post no longer appears in creator A's post list
  • Authenticate as creator B and attempt to DELETE the same post, assert 403 with forbidden
  • Assert an unauthenticated DELETE returns 401

Acceptance Criteria

  • 204 returned when the owner deletes their post
  • Post absent from the post list after deletion
  • Non-owner receives 403 with forbidden
  • Unauthenticated request returns 401
  • Deleted post cannot be fetched by ID (returns 404)

ETA: 12 hours


Coordinate on Telegram

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions