Skip to content

Commit 7226177

Browse files
committed
Add test for order clause with array arg
1 parent 9f39683 commit 7226177

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tests/QueryTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ class QueryTests : XCTestCase {
120120
AssertSQL("SELECT * FROM \"users\" ORDER BY \"age\", \"email\"", users.order(age, email))
121121
}
122122

123+
func test_order_withArrayExpressionNames_compilesOrderClause() {
124+
AssertSQL("SELECT * FROM \"users\" ORDER BY \"age\", \"email\"", users.order([age, email]))
125+
}
126+
123127
func test_order_withExpressionAndSortDirection_compilesOrderClause() {
124128
// AssertSQL("SELECT * FROM \"users\" ORDER BY \"age\" DESC, \"email\" ASC", users.order(age.desc, email.asc))
125129
}

0 commit comments

Comments
 (0)