Sha256: b678c7f22de6561f5340ec76aa2a3c626b608dd4c8d6197afd870dc7adffa2e1

Contents?: true

Size: 473 Bytes

Versions: 8

Compression:

Stored size: 473 Bytes

Contents

# encoding: utf-8

describe BestInPlace::Utils do
  include BestInPlace::Utils
  describe '#build_best_in_place_id' do
    it 'build id from symbol' do
      expect(build_best_in_place_id(:user, :login)).to eq('best_in_place_user_login')
    end

      it 'build id from record' do
        car = Cuca::Car.create
        expect(build_best_in_place_id(car, :model)).to eq("best_in_place_cuca_car_#{car.id}_model")
      end


  end

  describe '#object_to_key' do

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
best_in_place-4.0.0 spec/utils_spec.rb
best_in_place-3.1.1 spec/utils_spec.rb
best_in_place-3.1.0 spec/utils_spec.rb
best_in_place-3.0.3 spec/utils_spec.rb
best_in_place-3.0.2 spec/utils_spec.rb
best_in_place-3.0.1 spec/utils_spec.rb
best_in_place-3.0.0 spec/utils_spec.rb
best_in_place-3.0.0.rc1 spec/utils_spec.rb