Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Nov 15, 2023
1 parent 7a53df6 commit 4d5ff3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion database/migrations/2018_08_03_114156_create_urls_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public function up(): void
->nullable()
->constrained()
->cascadeOnDelete();
$table->string('keyword')->unique();
$table->string('keyword')
// ->collation('utf8mb4_bin')
->unique();
$table->boolean('is_custom');
$table->longText('destination');
$table->string('title');
Expand Down
12 changes: 12 additions & 0 deletions tests/Unit/Models/UrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,16 @@ public function totalClicks(): void

$this->assertSame(1, $actual);
}

/**
* @group u-model
*/
public function testKeywordColumnIsCaseSensitive(): void
{
$url_1 = Url::factory(['keyword' => 'foo'])->create();
$url_2 = Url::factory(['keyword' => 'Foo'])->create();

$this->assertSame('foo', $url_1->keyword);
$this->assertSame('Foo', $url_2->keyword);
}
}

0 comments on commit 4d5ff3f

Please sign in to comment.