blob: 3f44a9cc637f5f482e9b0024a9cacc8e48284302 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Organizations::OrganizationDetail, type: :model, feature_category: :cell do
describe 'associations' do
it { is_expected.to belong_to(:organization).inverse_of(:organization_detail) }
end
describe 'validations' do
it { is_expected.to validate_presence_of(:organization) }
it { is_expected.to validate_length_of(:description).is_at_most(1024) }
end
it_behaves_like Avatarable do
let(:model) { create(:organization_detail) }
end
context 'with uploads' do
it_behaves_like 'model with uploads', false do
let(:model_object) { create(:organization_detail) }
let(:upload_attribute) { :avatar }
let(:uploader_class) { AttachmentUploader }
end
end
end
|