2015-12-21 14:40:28 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
feature 'procedure locked' do
|
|
|
|
|
|
|
|
let(:administrateur) { create(:administrateur) }
|
2016-06-09 17:49:38 +02:00
|
|
|
let(:published) { false }
|
|
|
|
let(:procedure) { create(:procedure, administrateur: administrateur, published: published) }
|
2015-12-21 14:40:28 +01:00
|
|
|
|
|
|
|
before do
|
|
|
|
login_as administrateur, scope: :administrateur
|
|
|
|
visit admin_procedure_path(procedure)
|
|
|
|
end
|
|
|
|
|
2016-06-09 17:49:38 +02:00
|
|
|
context 'when procedure is not published' do
|
2015-12-21 14:40:28 +01:00
|
|
|
scenario 'info label is not present' do
|
2016-06-09 17:49:38 +02:00
|
|
|
expect(page).not_to have_content('La procédure ne peut plus être modifiée car elle a été publiée')
|
2015-12-21 14:40:28 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|