demarches-normaliennes/spec/views/admin/procedures/show.html.haml_spec.rb
2015-11-27 17:13:06 +01:00

23 lines
No EOL
535 B
Ruby

require 'spec_helper'
describe 'admin/procedures/show.html.haml', type: :view do
describe 'archive and unarchive button' do
before do
assign(:procedure, procedure)
render
end
context 'when procedure is active' do
let(:procedure) { create(:procedure) }
it { expect(rendered).to have_content('Archiver') }
end
context 'when procedure is archived' do
let(:procedure) { create(:procedure, archived: true) }
it { expect(rendered).to have_content('Activer') }
end
end
end