Skip to content

Commit

Permalink
Add test for scope filter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed May 25, 2020
1 parent b3fba93 commit 2737b22
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-query-builder` will be documented in this file

## 2.8.2 - 2020-05-25

- fix scope filters that are added via macros (e.g. `onlyTrashed`) (#469)

## 2.8.1 - 2020-03-20

- make service provider deferrable (#381)
Expand Down
13 changes: 13 additions & 0 deletions tests/FiltersTrashedTest.php
Expand Up @@ -46,6 +46,19 @@ public function it_can_filter_only_trashed()
$this->assertCount(1, $models);
}

/** @test */
public function it_can_filter_only_trashed_by_scope_directly()
{
$models = $this
->createQueryFromFilterRequest([
'only_trashed' => true
])
->allowedFilters(AllowedFilter::scope('only_trashed'))
->get();

$this->assertCount(1, $models);
}

/** @test */
public function it_can_filter_with_trashed()
{
Expand Down

0 comments on commit 2737b22

Please sign in to comment.