<commit_before>Feature: Deleting Items

  The system should delete items from a collection and handle the following scenarios:

	all good
	item doesn't exist
	collection doesn't exist

	Background:
	  Given I have a collection "c" with the following items
	  |slug				|name			|
	  |i  				|i   			|
	  |another-i 	|another-i|
	  Then the collection "c" has an item count of "2"

	# all good - 204 No Content
	# curl -i -X DELETE http://localhost:3000/c/i
	Scenario: Delete an item
  	When I have a "DELETE" request to URL "/c/i"
  	Then the status is "204"
  	And the body is empty
  	And the collection "c" has an item count of "1"
  	When I have a "GET" request to URL "/c/i"
  	And I accept a "item"
  	Then the status is "404"
  	When I have a "GET" request to URL "/c/another-i"
  	And I accept a "item"
  	Then the status is "200"
  	And the body is JSON
  	And the item is "another-i" named "another-i" in collection "c"

	# collection doesn't exist - 404 Not Found
	# curl -i -X DELETE http://localhost:3000/not-here/i
	Scenario: Delete an item from a collection that does not exist
	 	When I have a "DELETE" request to URL "/not-here/i"
	 	Then the status is "404"
	 	And the body is text
	 	And the body is "Collection not found."
	 	And the collection "c" has an item count of "2"

	# item doesn't exist - 404 Not Found
	# curl -i -X DELETE http://localhost:3000/c/not-here
	Scenario: Delete an item does not exist
	 	When I have a "DELETE" request to URL "/c/not-here"
	 	Then the status is "404"
	 	And the body is empty
	 	And the collection "c" has an item count of "2"<commit_msg>Be extra paranoid in making sure we didn't delete anything in the delete failure tests.<commit_after>Feature: Deleting Items

  The system should delete items from a collection and handle the following scenarios:

	all good
	item doesn't exist
	collection doesn't exist

	Background:
	  Given I have a collection "c" with the following items
	  |slug				|name			|
	  |i  				|i   			|
	  |another-i 	|another-i|
	  Then the collection "c" has an item count of "2"

	# all good - 204 No Content
	# curl -i -X DELETE http://localhost:3000/c/i
	Scenario: Delete an item
  	When I have a "DELETE" request to URL "/c/i"
  	Then the status is "204"
  	And the body is empty
  	And the collection "c" has an item count of "1"
  	When I have a "GET" request to URL "/c/i"
  	And I accept a "item"
  	Then the status is "404"
  	When I have a "GET" request to URL "/c/another-i"
  	And I accept a "item"
  	Then the status is "200"
  	And the body is JSON
  	And the item is "another-i" named "another-i" in collection "c"

	# collection doesn't exist - 404 Not Found
	# curl -i -X DELETE http://localhost:3000/not-here/i
	Scenario: Delete an item from a collection that does not exist
	 	When I have a "DELETE" request to URL "/not-here/i"
	 	Then the status is "404"
	 	And the body is text
	 	And the body is "Collection not found."
	 	And the collection "c" has an item count of "2"
	 	When I have a "GET" request to URL "/c/i"
	 	And I accept a "item"
	 	Then the status is "200"
	 	And the body is JSON
	 	And the item is "i" named "i" in collection "c"
	 	When I have a "GET" request to URL "/c/another-i"
	 	And I accept a "item"
	 	Then the status is "200"
	 	And the body is JSON
	 	And the item is "another-i" named "another-i" in collection "c"

	# item doesn't exist - 404 Not Found
	# curl -i -X DELETE http://localhost:3000/c/not-here
	Scenario: Delete an item does not exist
	 	When I have a "DELETE" request to URL "/c/not-here"
	 	Then the status is "404"
	 	And the body is empty
	 	And the collection "c" has an item count of "2"
	 	When I have a "GET" request to URL "/c/i"
	 	And I accept a "item"
	 	Then the status is "200"
	 	And the body is JSON
	 	And the item is "i" named "i" in collection "c"
	 	When I have a "GET" request to URL "/c/another-i"
	 	And I accept a "item"
	 	Then the status is "200"
	 	And the body is JSON
	 	And the item is "another-i" named "another-i" in collection "c"
{'fraction_non_alphanumeric': 0.0853719420868697, 'fraction_numerical': 0.022965551672491265, 'mean_word_length': 2.773069679849341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5706132', 'n_tokens_mistral': 1507, 'n_tokens_neox': 1305, 'n_words': 653}