Skip to content

Commit 7bf8421

Browse files
committed
Fixed tests for paginated response total pages calculation
1 parent c933f74 commit 7bf8421

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/MADE.Web.Tests/Tests/PaginatedResponseTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
namespace MADE.Web.Tests.Tests
22
{
3+
using System;
34
using System.Collections.Generic;
45
using System.Diagnostics.CodeAnalysis;
56
using MADE.Testing;
@@ -21,7 +22,7 @@ public void ShouldReturnPaginatedResultsWhenCountIsGreaterThanRequest()
2122
int pageSize = 3;
2223
int totalItemCount = 10;
2324

24-
int expectedPageCount = totalItemCount / pageSize;
25+
int expectedPageCount = (int)Math.Ceiling((double)totalItemCount / pageSize);
2526

2627
var items = new List<string> { "Hello", "World", "Test" };
2728

0 commit comments

Comments
 (0)