refactor(export/archives): holds user profile asking for the archive or export

This commit is contained in:
Martin 2024-02-07 17:19:50 +01:00
parent 4dfb3b86ef
commit 72a3f6e89c
18 changed files with 51 additions and 17 deletions

View file

@ -1,4 +1,12 @@
RSpec.describe Export, type: :model do
describe 'associations' do
let(:instructeur) { create(:instructeur) }
let(:export) { create(:export, user_profile_type: 'Instructeur', user_profile_id: instructeur.id) }
it 'find polymorphic association' do
expect(export.user_profile).to eq(instructeur)
end
end
describe 'validations' do
let(:groupe_instructeur) { create(:groupe_instructeur) }