Sha256: 3c0da793e6e2caf6b82519b56fcd25f6bbdded605a152c55630234324476ee51

Contents?: true

Size: 668 Bytes

Versions: 22

Compression:

Stored size: 668 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) }
  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

22 entries across 22 versions & 1 rubygems

Version Path
g5_updatable-0.10.3 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.10.2 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.10.1 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.10.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.9.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.8.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.7.2 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.7.1 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.7.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.6.1 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.6.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.5.1 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.5.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.4.3 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.4.2 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.4.1 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.4.0 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.3.5 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.3.4 spec/models/g5_updatable/client_spec.rb
g5_updatable-0.3.3 spec/models/g5_updatable/client_spec.rb