Sha256: f7aecd34886e48573007b4739353326c09ac8f92a2b039e9528886c5c60f7286
Contents?: true
Size: 1 KB
Versions: 60
Compression:
Stored size: 1 KB
Contents
require 'rails_helper' module PandaPal RSpec.describe Organization, type: :model do it 'creates a schema upon creation' do expect(Apartment::Tenant).to receive(:create) create :panda_pal_organization end it 'deletes a schema upon deletion' do expect(Apartment::Tenant).to receive(:create) expect(Apartment::Tenant).to receive(:drop) org = create :panda_pal_organization org.destroy end it 'does not allow the name to be changed after creation' do org = create :panda_pal_organization org.name = 'test123' expect(org.valid?).to be_falsey end it 'requires a salesforce_id' do org = build :panda_pal_organization, salesforce_id: nil expect(org.valid?).to be_falsey end it 'does not allow duplicate salesforce ids' do org = create :panda_pal_organization, salesforce_id: 'salesforce' org2 = build :panda_pal_organization, salesforce_id: 'salesforce' expect(org2.valid?).to be_falsey end end end
Version data entries
60 entries across 60 versions & 1 rubygems