-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from art-institute-of-chicago/feature/rename-d…
…igpubs-sections Rename Digital Publication "Sections" to "Articles" [API-409]
- Loading branch information
Showing
14 changed files
with
77 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...2024_05_30_141022_rename_digital_publication_sections_to_digital_publication_articles.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
return new class extends Migration | ||
{ | ||
public function up(): void | ||
{ | ||
Schema::rename('digital_publication_sections', 'digital_publication_articles'); | ||
} | ||
|
||
public function down(): void | ||
{ | ||
Schema::rename('digital_publication_articles', 'digital_publication_sections'); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Tests\Basic; | ||
|
||
use App\Models\Web\DigitalPublicationArticle; | ||
|
||
class DigitalPublicationArticleTest extends BasicTestCase | ||
{ | ||
protected $model = DigitalPublicationArticle::class; | ||
|
||
protected $route = 'digital-publication-articles'; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Tests\Unit; | ||
|
||
use Tests\TestCase; | ||
use Illuminate\Foundation\Testing\RefreshDatabase; | ||
use App\Models\Web\DigitalPublicationArticle; | ||
|
||
class DigitalPublicationArticleTest extends TestCase | ||
{ | ||
use RefreshDatabase; | ||
|
||
/** @test */ | ||
public function it_inserts_long_text_in_the_copy_field(): void | ||
{ | ||
$digitalPublictionArticle = $this->make(DigitalPublicationArticle::class, ['copy' => fake()->text(66000)]); // Longer than a `text` field | ||
$digitalPublictionArticleKey = $digitalPublictionArticle->getAttributeValue($digitalPublictionArticle->getKeyName()); | ||
|
||
$response = $this->getJson('api/v1/digital-publication-articles/' . $digitalPublictionArticleKey); | ||
$response->assertSuccessful(); | ||
|
||
$resource = $response->json()['data']; | ||
$this->assertGreaterThan(65535, strlen($resource['copy'])); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.