Skip to content

Commit

Permalink
Add Behat test for invalid list data
Browse files Browse the repository at this point in the history
This should ensure that the implementation works as expected.
  • Loading branch information
kasperg committed Jul 11, 2023
1 parent e93601e commit 8a6196f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/features/get_list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,20 @@ Feature: Fetching list
| 123-katalog:3 |
When checking if "321-basis:2" is on the list
Then the system should return success

Scenario: Invalid list items are not returned as a part of the list
Given a known user
And they have the following items on the list:
| material |
| 123-basis:1 |
# This item is invalid, and should not be part of the response.
| banana |
| 123-basis:2 |
Then fetching the list should return:
| material |
# The order of the list is intentionally reversed. The last item in the precondition should be the first in the
# response as items are returned with the most recently added first.
| 123-basis:2 |
| 123-basis:1 |
And the system should return success

0 comments on commit 8a6196f

Please sign in to comment.