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
|
2017-02-20 15:08:31 +01:00
|
|
|
expect(page).not_to have_content('Cette procédure a été publiée, certains éléments ne peuvent plus être modifiés')
|
2015-12-21 14:40:28 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|