mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 17:04:32 +08:00
@ -81,4 +81,20 @@ class ApiListingTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
public function test_total_on_results_shows_correctly()
|
||||
{
|
||||
$this->actingAsApiEditor();
|
||||
$bookCount = Book::query()->count();
|
||||
$resp = $this->get($this->endpoint . '?count=1');
|
||||
$resp->assertJson(['total' => $bookCount ]);
|
||||
}
|
||||
|
||||
public function test_total_on_results_shows_correctly_when_offset_provided()
|
||||
{
|
||||
$this->actingAsApiEditor();
|
||||
$bookCount = Book::query()->count();
|
||||
$resp = $this->get($this->endpoint . '?count=1&offset=1');
|
||||
$resp->assertJson(['total' => $bookCount ]);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user