Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit f0174c5

Browse files
committed
Fixed tests in PostgreSQL/SchemaTests failing due to case differences
1 parent fddbfc1 commit f0174c5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ServiceStack.OrmLite.PostgreSQL.Tests/SchemaTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public void Can_Create_Tables_With_Schema_in_PostgreSQL()
5353
CreateSchemaIfNotExists(db);
5454
db.DropAndCreateTable<User>();
5555

56-
var tables = db.Column<string>(@"SELECT '[' || n.nspname || '].[' || c.relname ||']' FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relname = 'Users' AND n.nspname = 'TestSchema'");
56+
var tables = db.Column<string>(@"SELECT '[' || n.nspname || '].[' || c.relname ||']' FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace WHERE c.relname = 'users' AND n.nspname = 'TestSchema'");
5757

5858
//PostgreSQL dialect should create the table in the schema
59-
Assert.That(tables.Contains("[TestSchema].[Users]"));
59+
Assert.That(tables.Contains("[TestSchema].[users]"));
6060
}
6161
}
6262

@@ -76,15 +76,15 @@ public void Can_Perform_CRUD_Operations_On_Table_With_Schema()
7676
var lastInsertId = db.LastInsertId();
7777
Assert.That(lastInsertId, Is.GreaterThan(0));
7878

79-
var rowsB = db.Select<User>("\"Name\" = @name", new { name = "B" });
79+
var rowsB = db.Select<User>("\"name\" = @name", new { name = "B" });
8080
Assert.That(rowsB, Has.Count.EqualTo(2));
8181

8282
var rowIds = rowsB.ConvertAll(x => x.Id);
8383
Assert.That(rowIds, Is.EquivalentTo(new List<long> { 2, 3 }));
8484

8585
rowsB.ForEach(x => db.Delete(x));
8686

87-
rowsB = db.Select<User>("\"Name\" = @name", new { name = "B" });
87+
rowsB = db.Select<User>("\"name\" = @name", new { name = "B" });
8888
Assert.That(rowsB, Has.Count.EqualTo(0));
8989

9090
var rowsLeft = db.Select<User>();

0 commit comments

Comments
 (0)