Skip to content

Commit

Permalink
fix failing tests caused from hard-coded escape string
Browse files Browse the repository at this point in the history
  • Loading branch information
Ste1io committed Sep 27, 2023
1 parent 8b5d0e8 commit 4c1723d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PetaPoco.Tests.Integration/Databases/BaseQueryTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
Expand Down Expand Up @@ -176,11 +176,11 @@ public virtual void Page_ForPocoGivenSqlStringWithEscapedOrderByColumn_ShouldRet
{
AddPeople(15, 5);

var page = DB.Page<Person>(1, 5, "WHERE 1 = 1 ORDER BY [FullName]");
var page = DB.Page<Person>(1, 5, $"WHERE 1 = 1 ORDER BY {DB.Provider.EscapeSqlIdentifier("FullName")}");
page.CurrentPage.ShouldBe(1);
page.TotalPages.ShouldBe(4);

page = DB.Page<Person>(2, 5, "WHERE 1 = 1 ORDER BY [FullName]");
page = DB.Page<Person>(2, 5, $"WHERE 1 = 1 ORDER BY {DB.Provider.EscapeSqlIdentifier("FullName")}");
page.CurrentPage.ShouldBe(2);
page.TotalPages.ShouldBe(4);
}
Expand Down

0 comments on commit 4c1723d

Please sign in to comment.