Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

The listing API overwrites an existing listing that has the given slug. #105

@rmisio

Description

@rmisio

Scenario #1

Steps to reproduce:
1.) Send a POST to create a new listing with the slug 'check-yo-self'.
2.) Send another POST to create a new listing with the slug 'check-yo-self'.

Observed Results:
The second post creates a listing that overwrites the one from the first post.

Expected Results:
On the second POST an error is returned saying 'That slug already exists' and the second listing is not saved.

Scenario #2

Steps to reproduce:
1.) Send a POST to create a new listing with the slug 'hello-world'.
2.) Send a POST to create a new listing with the slug 'bye-world'.
3.) Update the 'bye-world' listing by sending a PUT with a slug of 'hello-world' and a currentSlug of 'bye-world'.

Observed Results:
The 'hello-world' listing is overwritten with the updated contents of the 'bye-world' listing.

Expected Results:
If you attempt to update the slug of a listing to a slug that already exists, an error is returned saying 'That slug already exists' and the listing is not saved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions