Sha256: a01829ad7bd0549d6e70bbf7057338a45a21334c913dce5874de6da906de5b68

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

# rubocop:disable RSpec/DescribeClass
shared_examples_for '.find' do |searched_entity_id|
  describe '.find' do
    let( :find_id_1 ) do
      VCR.use_cassette( "#{ vcr_dir }/find_id_1" ){ repository.find( searched_entity_id ) }
    end

    specify 'returns correct class' do
      expect( find_id_1.class ).to be described_class::MODEL
    end

    specify 'returns correct Customer' do
      expect( find_id_1.unique_id ).to eq( searched_entity_id )
    end

    specify 'returned Customer is marked as saved' do
      expect( find_id_1 ).to be_saved
    end

    specify 'returned Customer is not markes as new' do
      expect( find_id_1 ).not_to be_new
    end
  end
end
# rubocop:enable RSpec/DescribeClass

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fortnox-api-0.2.0 spec/fortnox/api/repositories/examples/find.rb