Merge remote-tracking branch 'parent/main' into upstream-20240913
This commit is contained in:
commit
fc9d27ff91
392 changed files with 3757 additions and 3233 deletions
|
@ -32,28 +32,6 @@ RSpec.describe MediaComponentHelper do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'render_card_component' do
|
||||
let(:status) { Fabricate(:status) }
|
||||
let(:result) { helper.render_card_component(status) }
|
||||
|
||||
before do
|
||||
PreviewCardsStatus.create(status: status, preview_card: Fabricate(:preview_card))
|
||||
end
|
||||
|
||||
it 'returns the correct react component markup' do
|
||||
expect(parsed_html.div['data-component']).to eq('Card')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'render_poll_component' do
|
||||
let(:status) { Fabricate(:status, poll: Fabricate(:poll)) }
|
||||
let(:result) { helper.render_poll_component(status) }
|
||||
|
||||
it 'returns the correct react component markup' do
|
||||
expect(parsed_html.div['data-component']).to eq('Poll')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def parsed_html
|
||||
|
|
|
@ -36,14 +36,14 @@ RSpec.describe StatusesHelper do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'fa_visibility_icon' do
|
||||
describe 'visibility_icon' do
|
||||
context 'with a status that is public' do
|
||||
let(:status) { Status.new(visibility: 'public') }
|
||||
|
||||
it 'returns the correct fa icon' do
|
||||
result = helper.fa_visibility_icon(status)
|
||||
result = helper.visibility_icon(status)
|
||||
|
||||
expect(result).to match('material-globe')
|
||||
expect(result).to match('globe')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -51,9 +51,9 @@ RSpec.describe StatusesHelper do
|
|||
let(:status) { Status.new(visibility: 'unlisted') }
|
||||
|
||||
it 'returns the correct fa icon' do
|
||||
result = helper.fa_visibility_icon(status)
|
||||
result = helper.visibility_icon(status)
|
||||
|
||||
expect(result).to match('material-lock_open')
|
||||
expect(result).to match('lock_open')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -61,9 +61,9 @@ RSpec.describe StatusesHelper do
|
|||
let(:status) { Status.new(visibility: 'private') }
|
||||
|
||||
it 'returns the correct fa icon' do
|
||||
result = helper.fa_visibility_icon(status)
|
||||
result = helper.visibility_icon(status)
|
||||
|
||||
expect(result).to match('material-lock')
|
||||
expect(result).to match('lock')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -71,9 +71,9 @@ RSpec.describe StatusesHelper do
|
|||
let(:status) { Status.new(visibility: 'direct') }
|
||||
|
||||
it 'returns the correct fa icon' do
|
||||
result = helper.fa_visibility_icon(status)
|
||||
result = helper.visibility_icon(status)
|
||||
|
||||
expect(result).to match('material-alternate_email')
|
||||
expect(result).to match('alternate_email')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue