2024-04-29 00:17:15 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2024-06-05 17:25:10 +02:00
|
|
|
describe Procedure::PendingRepublishComponent, type: :component do
|
|
|
|
subject { render_inline(described_class.new(render_if:, procedure: build(:procedure, id: 1))) }
|
|
|
|
let(:page) { subject }
|
|
|
|
describe 'render_if' do
|
|
|
|
context 'when false' do
|
|
|
|
let(:render_if) { false }
|
|
|
|
it { expect(page).not_to have_text('Ces modifications ne seront appliquées') }
|
|
|
|
end
|
|
|
|
context 'when true' do
|
|
|
|
let(:render_if) { true }
|
|
|
|
it { expect(page).to have_text('Ces modifications ne seront appliquées') }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|