Compare commits
No commits in common. "0fb259a373be4139f1b7e0d353146179ae68f9ec" and "35a8c59055c8446075241b039b930cd799592220" have entirely different histories.
0fb259a373
...
35a8c59055
|
@ -33,8 +33,6 @@ class FormApiResource extends JsonResource
|
|||
'slug' => $this->slug,
|
||||
'dates' => $this->from->equalTo($this->to) ? $this->from->format('d.m.Y') : $this->from->format('d.m.Y') . ' - ' . $this->to->format('d.m.Y'),
|
||||
'image' => $this->getMedia('headerImage')->first()->getFullUrl('square'),
|
||||
'is_active' => $this->is_active,
|
||||
'is_private' => $this->is_private,
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,6 @@ use Tests\RequestFactories\EditorRequestFactory;
|
|||
* @method self excerpt(string $excerpt)
|
||||
* @method self registrationFrom(string|null $date)
|
||||
* @method self registrationUntil(string|null $date)
|
||||
* @method self isActive(bool $isActive)
|
||||
* @method self isPrivate(bool $isPrivate)
|
||||
*/
|
||||
class FormFactory extends Factory
|
||||
{
|
||||
|
|
|
@ -84,9 +84,7 @@ class FormApiListActionTest extends FormTestCase
|
|||
sleep(1);
|
||||
$this->get('/api/form?perPage=15&filter=' . $this->filterString(['inactive' => true]))->assertJsonCount(3, 'data');
|
||||
$this->get('/api/form?perPage=15&filter=' . $this->filterString(['inactive' => false]))->assertJsonCount(2, 'data');
|
||||
$this->get('/api/form?perPage=15&filter=' . $this->filterString([]))->assertJsonCount(2, 'data')
|
||||
->assertJsonPath('data.0.is_active', true)
|
||||
->assertJsonPath('data.0.is_private', false);
|
||||
$this->get('/api/form?perPage=15&filter=' . $this->filterString([]))->assertJsonCount(2, 'data');
|
||||
}
|
||||
|
||||
public function testItDisplaysDailyForms(): void
|
||||
|
|
|
@ -17,8 +17,6 @@ use Worksome\RequestFactories\RequestFactory;
|
|||
* @method self excerpt(string $description)
|
||||
* @method self registrationFrom(string|null $date)
|
||||
* @method self registrationUntil(string|null $date)
|
||||
* @method self isActive(bool $isActive)
|
||||
* @method self isPrivate(bool $isPrivate)
|
||||
*/
|
||||
class FormRequest extends RequestFactory
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue