demarches-normaliennes/spec/models/expert_spec.rb
2021-01-20 18:03:05 +01:00

16 lines
340 B
Ruby

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 }
before do
procedure.experts << expert
procedure.reload
end
it { expect(procedure.experts).to eq([expert]) }
end
end