Tests : add an expert to a procedure and put give him the access to see the dossier final decision
This commit is contained in:
parent
d409a9a6c5
commit
e0cb0eebab
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue