Skip to content

Commit 79f5eb9

Browse files
committed
Add Tests to cover usernames with underscores
1 parent 0131ab0 commit 79f5eb9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Unit/Actions/ParseAndLinkifyGitHubUsernamesActionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@
3131

3232
expect($result)->toEqual('This is a string with a [@user-name](https://github.com/user-name) in it.');
3333
});
34+
35+
it('replaces GitHub usernames with links if it contains _', function () {
36+
37+
$result = app(ParseAndLinkifyGitHubUsernamesAction::class)->execute('This is a string with a @user_name in it.');
38+
39+
expect($result)->toEqual('This is a string with a [@user_name](https://github.com/user_name) in it.');
40+
});

0 commit comments

Comments
 (0)