diff options
Diffstat (limited to 'spec/features/broadcast_messages_spec.rb')
-rw-r--r-- | spec/features/broadcast_messages_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/broadcast_messages_spec.rb b/spec/features/broadcast_messages_spec.rb index 809e53ed7f7..41e8e969610 100644 --- a/spec/features/broadcast_messages_spec.rb +++ b/spec/features/broadcast_messages_spec.rb @@ -68,4 +68,16 @@ describe 'Broadcast Messages' do expect(page).to have_content "Hi #{user.name}" end + + it 'renders broadcast message with placeholders and styled links' do + create(:broadcast_message, broadcast_type: 'notification', message: "Hi {{name}} <a href='gitlab.com' style='color: purple'>click</a>") + + user = create(:user) + sign_in(user) + + visit root_path + + expected_html = "<p>Hi #{user.name} <a href=\"gitlab.com\" style=\"color: purple\">click</a></p>" + expect(page.body).to include(expected_html) + end end |