Sha256: 2daaa1f4efd23cb8162bdad88fd14b0f0f34ced48b6cd5004720935a071deef2

Contents?: true

Size: 826 Bytes

Versions: 44

Compression:

Stored size: 826 Bytes

Contents

require 'spec_helper'

RSpec.describe 'DataModels::Client' do
  subject { PatronusFati::DataModels::Client }

  let(:unsaved_instance) { subject.new(bssid: '12:34:56:00:00:02') }
  let(:saved_instance)   { unsaved_instance.save }

  it { expect(subject).to have_property(:id) }
  it { expect(subject).to have_property(:bssid) }
  it { expect(subject).to have_property(:last_seen_at) }

  it { expect(subject).to have_many(:probes) }

  it { expect(subject).to have_many(:connections) }
  it { expect(subject).to have_many(:access_points).through(:connections) }

  it { expect(subject).to belong_to(:mac) }

  it 'should associate to a MAC object before saving' do
    expect(unsaved_instance.mac).to be_nil
    unsaved_instance.save
    expect(unsaved_instance.mac).to be_instance_of(PatronusFati::DataModels::Mac)
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
patronus_fati-0.9.24 spec/data_models/client_spec.rb
patronus_fati-0.9.23 spec/data_models/client_spec.rb
patronus_fati-0.9.22 spec/data_models/client_spec.rb
patronus_fati-0.9.21 spec/data_models/client_spec.rb
patronus_fati-0.9.20 spec/data_models/client_spec.rb
patronus_fati-0.9.19 spec/data_models/client_spec.rb
patronus_fati-0.9.18 spec/data_models/client_spec.rb
patronus_fati-0.9.17 spec/data_models/client_spec.rb
patronus_fati-0.9.16 spec/data_models/client_spec.rb
patronus_fati-0.9.15 spec/data_models/client_spec.rb
patronus_fati-0.9.14 spec/data_models/client_spec.rb
patronus_fati-0.9.13 spec/data_models/client_spec.rb
patronus_fati-0.9.12 spec/data_models/client_spec.rb
patronus_fati-0.9.11 spec/data_models/client_spec.rb
patronus_fati-0.9.10 spec/data_models/client_spec.rb
patronus_fati-0.9.9 spec/data_models/client_spec.rb
patronus_fati-0.9.8 spec/data_models/client_spec.rb
patronus_fati-0.9.7 spec/data_models/client_spec.rb
patronus_fati-0.9.6 spec/data_models/client_spec.rb
patronus_fati-0.9.5 spec/data_models/client_spec.rb