test: Deleted wrong test, add PR no to CHANGELOG

Signed-off-by: Sebastian Fey <info@sebastianfey.de>
This commit is contained in:
Sebastian Fey 2023-10-29 18:25:42 +01:00
Родитель c435f808ed
Коммит 75e69073b1
3 изменённых файлов: 3 добавлений и 12 удалений

Просмотреть файл

@ -28,7 +28,7 @@
- Hode the button to copy ingredients unless there are some ingredients to copy
[#1844](https://github.com/nextcloud/cookbook/pull/1844) @christianlupus
- Allow single tool in JSON+LD import, fixes #1641
[#XXXX](https://github.com/nextcloud/cookbook/pull/1844) @seyfeb
[#1864](https://github.com/nextcloud/cookbook/pull/1844) @seyfeb
### Maintenance
- Fix URL of Transifex after upstream subdomain change

Просмотреть файл

@ -50,6 +50,8 @@ class FixToolsFilter extends AbstractJSONFilter {
if (!is_array($json[self::TOOLS])) {
$t = trim($json[self::TOOLS]);
$t = $this->textCleaner->cleanUp($t, false);
// Empty string would mean no tools (i.e., empty array)
if($t != "") {
$tools[] = $t;
}

Просмотреть файл

@ -2,7 +2,6 @@
namespace OCA\Cookbook\tests\Unit\Helper\Filter\JSON;
use OCA\Cookbook\Exception\InvalidRecipeException;
use OCA\Cookbook\Helper\Filter\JSON\FixToolsFilter;
use OCA\Cookbook\Helper\TextCleanupHelper;
use OCP\IL10N;
@ -70,14 +69,4 @@ class FixToolsFilterTest extends TestCase {
$this->assertEquals($changed, $ret);
$this->assertEquals($this->stub, $recipe);
}
public function testApplyString() {
$recipe = $this->stub;
$recipe['tool'] = 'some text';
$this->textCleanupHelper->method('cleanUp')->willReturnArgument(0);
$this->expectException(InvalidRecipeException::class);
$this->dut->apply($recipe);
}
}