Sha256: c4d52e1328a21d55e63524a9242a1aa75ad7686e0cd061e62267bd92ab5eafe1

Contents?: true

Size: 1021 Bytes

Versions: 9

Compression:

Stored size: 1021 Bytes

Contents

require 'spec_helper'

describe Arpa::Repositories::Profiles::Finder, type: :repository, slow: true do

  let(:record_001) { create :repository_profile, name: 'profile_01' }
  let(:record_002) { create :repository_profile, name: 'profile_02' }

  before do
    record_001
    record_002
  end

  describe '#find' do
    let(:result) { subject.find(record_001.id) }

    it 'the Profile entity should has name "profile_01"' do
      expect(result.name).to eql 'profile_01'
    end

    it 'the result should be an Arpa::Entities::Profile' do
      expect(result).to be_an Arpa::Entities::Profile
    end

  end

  describe '#all' do
    let(:result) { subject.all }

    it 'should return size 2' do
      expect(result.size).to be == 2
    end

    it 'the first Profile entity should has name "profile_01"' do
      expect(result.first.name).to eql 'profile_01'
    end

    it 'the result should be an Array of Arpa::Entities::Profile' do
      expect(result.first).to be_an Arpa::Entities::Profile
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arpa-0.1.0 spec/lib/arpa/repositories/profiles/finder_spec.rb
arpa-0.0.9 spec/lib/arpa/repositories/profiles/finder_spec.rb
arpa-0.0.8 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.7 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.6 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.5 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.4 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.3 spec/lib/ar/repositories/profiles/finder_spec.rb
arpa-0.0.2 spec/lib/ar/repositories/profiles/finder_spec.rb