test(email-templates): align token assertions with current dot-notation tokens 🤖#1190
Open
mrjbj wants to merge 1 commit intoHiEventsDev:developfrom
Open
test(email-templates): align token assertions with current dot-notation tokens 🤖#1190mrjbj wants to merge 1 commit intoHiEventsDev:developfrom
mrjbj wants to merge 1 commit intoHiEventsDev:developfrom
Conversation
…on tokens
EmailTemplateTokenTest asserts old underscore-style token names
({{ order_first_name }}, {{ attendee_name }}, {{ event_title }}, etc.)
but LiquidTemplateRenderer::getAvailableTokens has emitted dot-notation
tokens ({{ order.first_name }}, {{ attendee.name }}, {{ event.title }})
since the token format was refactored. The test was never updated, so
3 of its 6 cases have been failing on develop.
Update assertions to match the actual emitted tokens. No production
code change.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes I've made
AI noticed that certain tests were failing on develop branch due to code refactoring from snake_case to dot.notaion in
EmailTemplageTokenTestThis patch updates those tests.EmailTemplateTokenTestasserts old underscore-style token names ({{ order_first_name }},{{ attendee_name }},{{ event_title }},{{ order_number }},{{ order_total }},{{ organizer_name }},{{ order_last_name }}) butLiquidTemplateRenderer::getAvailableTokenshas been emitting dot-notation tokens ({{ order.first_name }},{{ attendee.name }},{{ event.title }}, etc.) since the format was refactored. The test was never updated, so 3 of its 6 cases have been failingon
developfor a while:test_can_get_order_confirmation_tokens(asserts{{ order_first_name }}exists)test_can_get_attendee_ticket_tokens(asserts{{ attendee_name }}exists)test_tokens_include_order_specific_tokens(asserts{{ event_title }}etc. exist)This PR updates the assertions to match the actual emitted tokens. No production code change — purely test alignment.
How I've tested these changes
php artisan test --filter=EmailTemplateTokenTest— 6 passed (was 3 failed)Checklist