Sha256: c57a0a820967d5a18475996f9eab14a5edddc11f74e7cb098f2c23e470c22080
Contents?: true
Size: 776 Bytes
Versions: 1
Compression:
Stored size: 776 Bytes
Contents
require 'spec_helper' describe G5Updatable::Client do describe "validations" do subject(:client) { G5Updatable::Client.new } it { expect(client).to validate_presence_of(:uid) } it { expect(client).to validate_presence_of(:urn) } it { expect(client).to validate_uniqueness_of(:urn) } it { expect(client).to have_many :locations } end it_behaves_like "a model with first-class properties" do let(:instance_factory_name) { :client } end it_behaves_like "a model that uses its URN as its parameter" do let(:instance_factory_name) { :client } end describe :locations do let!(:location) { create(:location, client_uid: subject.uid) } subject { create(:client) } its(:locations) { is_expected.to eq([location]) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g5_updatable-0.20.3.pre.1 | spec/models/g5_updatable/client_spec.rb |