Tests : add an expert to a procedure and put give him the access to see the dossier final decision

This commit is contained in:
kara Diaby 2021-01-12 15:08:57 +01:00
parent d409a9a6c5
commit e0cb0eebab

View file

@ -1,8 +1,5 @@
require 'rails_helper'
RSpec.describe Expert, type: :model do
describe 'an expert could be add to a procedure' do
let(:procedure) { create(:procedure) }
let(:expert) { Expert.create }
@ -12,5 +9,7 @@ RSpec.describe Expert, type: :model do
end
it { expect(procedure.experts).to eq([expert]) }
it { expect(ExpertsProcedure.where(expert: expert, procedure: procedure).count).to eq(1) }
it { expect(ExpertsProcedure.where(expert: expert, procedure: procedure).first.allow_decision_access).to be_falsy }
end
end