Skip to content

Commit

Permalink
fix: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
binaryk committed Jul 1, 2024
1 parent 5fe6c6f commit 532febb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/Controllers/RepositoryFilterControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public function test_available_filters_contains_matches_sortables_searches(): vo
->assertJson(
fn (AssertableJson $json) => $json
->where('data.0.rules.is_active', 'bool')
->where('data.4.type', 'text')
->where('data.4.column', 'title')
->where('data.5.type', 'value')
->where('data.5.type', 'text')
->where('data.5.column', 'title')
->where('data.6.type', 'value')
->where('data.6.column', 'id')
->where('data.6.column', 'title')
->where('data.7.type', 'value')
->where('data.7.column', 'id')
->etc()
)
->assertJsonCount(8, 'data');
->assertJsonCount(9, 'data');
}

public function test_available_filters_returns_only_matches_sortables_searches(): void
Expand Down
2 changes: 2 additions & 0 deletions tests/Fixtures/Post/ValueFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

class ValueFilter extends AdvancedFilter
{
public ?string $column = 'title';

public function filter(RestifyRequest $request, Builder|Relation $query, $value)
{
$operator = $this->rest('operator');
Expand Down

0 comments on commit 532febb

Please sign in to comment.