mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-23 08:34:13 -05:00
Add spec
Test that usernames with underscores get linked correctly Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
This commit is contained in:
parent
41bc94adf8
commit
5930fb7323
@ -75,6 +75,15 @@ RSpec.describe AdvancedTextFormatter do
|
||||
it 'creates a mention link' do
|
||||
expect(subject).to include '<a href="https://cb6e6126.ngrok.io/@alice" class="u-url mention">@<span>alice</span></a></span>'
|
||||
end
|
||||
|
||||
context 'when username contains underscores' do
|
||||
let(:preloaded_accounts) { [Fabricate(:account, username: '_bob_')] }
|
||||
let(:text) { '@_bob_' }
|
||||
|
||||
it 'creates a mention link' do
|
||||
expect(subject).to include '<a href="https://cb6e6126.ngrok.io/@_bob_" class="u-url mention">@<span>_bob_</span></a></span>'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with text containing unlinkable mentions' do
|
||||
|
Loading…
Reference in New Issue
Block a user