mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 09:05:13 -07:00
Merge pull request #1272 from Shopify/StaticRegisters/add-test-coverage
[StaticRegisters] Add test coverage
This commit is contained in:
@@ -52,6 +52,12 @@ class StaticRegistersUnitTest < Minitest::Test
|
|||||||
static_register.fetch(:d)
|
static_register.fetch(:d)
|
||||||
end
|
end
|
||||||
assert_equal("default", static_register.fetch(:d, "default"))
|
assert_equal("default", static_register.fetch(:d, "default"))
|
||||||
|
|
||||||
|
result = static_register.fetch(:d) { "default" }
|
||||||
|
assert_equal("default", result)
|
||||||
|
|
||||||
|
result = static_register.fetch(:d, "default 1") { "default 2" }
|
||||||
|
assert_equal("default 2", result)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_key
|
def test_key
|
||||||
|
|||||||
Reference in New Issue
Block a user