mirror of
https://github.com/funamitech/mastodon
synced 2024-12-21 10:08:26 +09:00
25 lines
730 B
Ruby
25 lines
730 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'rails_helper'
|
|
|
|
describe FormattingHelper do
|
|
include Devise::Test::ControllerHelpers
|
|
|
|
describe '#rss_status_content_format' do
|
|
let(:status) { Fabricate(:status, text: 'Hello world<>', spoiler_text: 'This is a spoiler<>', poll: Fabricate(:poll, options: %w(Yes<> No))) }
|
|
let(:html) { helper.rss_status_content_format(status) }
|
|
|
|
it 'renders the spoiler text' do
|
|
expect(html).to include('<p>This is a spoiler<></p><hr>')
|
|
end
|
|
|
|
it 'renders the status text' do
|
|
expect(html).to include('<p>Hello world<></p>')
|
|
end
|
|
|
|
it 'renders the poll' do
|
|
expect(html).to include('<radio disabled="disabled">Yes<></radio><br>')
|
|
end
|
|
end
|
|
end
|