タグ列の番号飛びを許容

This commit is contained in:
shibafu
2020-05-14 00:27:09 +09:00
parent 41ce5229c7
commit 0ca7b8b7e1
3 changed files with 26 additions and 7 deletions

View File

@@ -215,7 +215,7 @@ class CheckinCsvImporterTest extends TestCase
$importer->execute();
}
public function testTagCantAcceptJumpedColumnUTF8()
public function testTagCanAcceptJumpedColumnUTF8()
{
$user = factory(User::class)->create();
@@ -225,8 +225,9 @@ class CheckinCsvImporterTest extends TestCase
$tags = $ejaculation->tags()->get();
$this->assertSame(1, $user->ejaculations()->count());
$this->assertCount(1, $tags);
$this->assertCount(2, $tags);
$this->assertEquals('貧乳', $tags[0]->name);
$this->assertEquals('巨乳', $tags[1]->name);
}
public function testTagCantAcceptMultilineUTF8()
@@ -239,6 +240,20 @@ class CheckinCsvImporterTest extends TestCase
$importer->execute();
}
public function testTagCanAccept32ColumnsUTF8()
{
$user = factory(User::class)->create();
$importer = new CheckinCsvImporter($user, __DIR__ . '/../../fixture/Csv/tag-33-column.utf8.csv');
$importer->execute();
$ejaculation = $user->ejaculations()->first();
$tags = $ejaculation->tags()->get();
$this->assertSame(1, $user->ejaculations()->count());
$this->assertCount(32, $tags);
$this->assertEquals('み', $tags[31]->name);
}
public function testSourceIsCsv()
{
$user = factory(User::class)->create();