From 8a6196f4974d0724c9f2e4882c8de324b2b0a071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Tue, 11 Jul 2023 23:06:54 +0200 Subject: [PATCH] Add Behat test for invalid list data This should ensure that the implementation works as expected. --- tests/features/get_list.feature | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/features/get_list.feature b/tests/features/get_list.feature index 07732ba..4c00874 100644 --- a/tests/features/get_list.feature +++ b/tests/features/get_list.feature @@ -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 +