2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-08-28 14:31:12 +02:00
|
|
|
describe Procedure::Card::ChorusComponent, type: :component do
|
|
|
|
describe 'render' do
|
|
|
|
let(:procedure) { create(:procedure) }
|
|
|
|
|
|
|
|
subject do
|
|
|
|
render_inline(described_class.new(procedure: procedure))
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'feature flag not active' do
|
|
|
|
it 'does not render' do
|
|
|
|
subject
|
|
|
|
expect(page).not_to have_text('Connecteur Chorus')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
context 'feature flag active' do
|
2023-10-23 08:58:50 +02:00
|
|
|
before { Flipper.enable_actor :engagement_juridique_type_de_champ, procedure }
|
2023-08-28 14:31:12 +02:00
|
|
|
|
|
|
|
it 'render the template' do
|
|
|
|
subject
|
|
|
|
expect(page).to have_text('Connecteur Chorus')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|