Skip to content

Commit

Permalink
fixing tests on legacy swift versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyapuchka committed Dec 22, 2017
1 parent e2c7534 commit cf63e50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tests/StencilTests/FilterSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func testFilter() {

$0.it("checks for underlying nil value correctly") {
let template = Template(templateString: "Hello {{ user.name|default:\"anonymous\" }}")
let result = try template.render(Context(dictionary: ["user": ["name": nil]]))
let user: [String: String?] = ["name": nil] as Any
let result = try template.render(Context(dictionary: ["user": user]))
try expect(result) == "Hello anonymous"
}
}
Expand Down

0 comments on commit cf63e50

Please sign in to comment.