Sha256: 23551b8102a05e4b15f4641c65f8fde95997a7bf8bb6c96e9ea896a16001d7eb

Contents?: true

Size: 1.08 KB

Versions: 10

Compression:

Stored size: 1.08 KB

Contents

require 'rails_helper'

RSpec.describe ::Dorsale::CustomerVault::Corporation, type: :model do
    it { is_expected.to have_one(:address).dependent(:destroy) }
    it { is_expected.to have_many :comments }
    it { is_expected.to have_many :taggings }
    it { is_expected.to have_many :tags }
    it { is_expected.to have_many :individuals }
    it { is_expected.to have_many(:tasks).dependent(:destroy) }
    it { is_expected.to have_many(:events).dependent(:destroy) }

    it { is_expected.to respond_to :legal_form }
    it { is_expected.to respond_to :capital }
    it { is_expected.to respond_to :immatriculation_number }
    it { is_expected.to respond_to :naf }
    it { is_expected.to respond_to :revenue }
    it { is_expected.to respond_to :context }
    it { is_expected.to respond_to :number_of_employees }
    it { is_expected.to respond_to :societe_com }

    it { is_expected.to belong_to :activity_type }
    it { is_expected.to belong_to :origin }

    it { is_expected.to have_many(:comments).dependent(:destroy) }

    it { is_expected.to validate_presence_of :corporation_name }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dorsale-3.8.1 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.8.0 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.8 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.7 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.6 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.5 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.4 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.2 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.1 spec/models/dorsale/customer_vault/corporation_spec.rb
dorsale-3.7.0 spec/models/dorsale/customer_vault/corporation_spec.rb