Skip to content

Commit da754d1

Browse files
authored
Fix failure in quickdraw/sgml/attributes.test.rb when running tests locally (#908)
```sh phlex$ bundle exec qt ... (./quickdraw/sgml/attributes.test.rb) ./quickdraw/sgml/attributes.test.rb:184 _, Time ./quickdraw/sgml/attributes.test.rb:186 Expected HTML strings to be equal (compared with `actual == expected`): Actual Expected 1 <div attribute="2023-01-15T12:30:45-06:00"></div> 1 <div attribute="2023-01-15T12:30:45+00:00"></div> Passed: 1630 | Failed: 1 | Errors: 0 ``` The test asserts a zero offset, but `Time.new` defaults to the local timezone, which may be different. https://docs.ruby-lang.org/en/3.4/Time.html#method-c-new
1 parent 82d6564 commit da754d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickdraw/sgml/attributes.test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
end
183183

184184
test "_, Time" do
185-
output = phlex { div(attribute: Time.new(2023, 1, 15, 12, 30, 45)) }
185+
output = phlex { div(attribute: Time.new(2023, 1, 15, 12, 30, 45, "+00:00")) }
186186
assert_equal_html output, %(<div attribute="2023-01-15T12:30:45+00:00"></div>)
187187
end
188188

0 commit comments

Comments
 (0)