Administrator can unarchived a procedure
This commit is contained in:
parent
7c3f322d6e
commit
3eb990a611
5 changed files with 36 additions and 13 deletions
23
spec/views/admin/procedures/show.html.haml_spec.rb
Normal file
23
spec/views/admin/procedures/show.html.haml_spec.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue