Add global variable test for block tag
This commit is contained in:
parent
173205ec66
commit
0c4a8e82e4
|
@ -19,6 +19,22 @@ Feature: Jekyll responsive_image_block tag
|
|||
When I run Jekyll
|
||||
Then I should see "<img alt=\"Lorem ipsum\" src=\"/assets/test.png\" title=\"Magic rainbow adventure!\"" in "_site/index.html"
|
||||
|
||||
Scenario: Global variables available in templates
|
||||
Given I have a file "index.html" with:
|
||||
"""
|
||||
{% responsive_image_block %}
|
||||
path: assets/test.png
|
||||
{% endresponsive_image_block %}
|
||||
"""
|
||||
And I have a configuration with:
|
||||
"""
|
||||
baseurl: https://wildlyinaccurate.com
|
||||
responsive_image:
|
||||
template: _includes/base-url.html
|
||||
"""
|
||||
When I run Jekyll
|
||||
Then I should see "<img src=\"https://wildlyinaccurate.com/assets/test.png\">" in "_site/index.html"
|
||||
|
||||
Scenario: More complex logic in the block tag
|
||||
Given I have a responsive_image configuration with "template" set to "_includes/responsive-image.html"
|
||||
And I have a file "index.html" with:
|
||||
|
|
Loading…
Reference in New Issue