Sha256: 4b003250766ded5bcff5174c30b5d32788eb4eea3a49099ae28910b99f2fdc8d

Contents?: true

Size: 851 Bytes

Versions: 52

Compression:

Stored size: 851 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'spec_helper'

describe Exemplify do
  fixtures :all

  before(:each) do
    @exemplify = FactoryGirl.create(:exemplify)
  end

  it 'should create lending policy' do
    @exemplify.item.lending_policies.size.should eq 3
    periods = UserGroupHasCheckoutType.available_for_item(@exemplify.item).order('user_group_has_checkout_types.id').collect(&:checkout_period)
    @exemplify.item.lending_policies.order('lending_policies.id').collect(&:loan_period).should eq periods
  end
end

# == Schema Information
#
# Table name: exemplifies
#
#  id               :integer          not null, primary key
#  manifestation_id :integer          not null
#  item_id          :integer          not null
#  position         :integer
#  created_at       :datetime         not null
#  updated_at       :datetime         not null
#

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
enju_biblio-0.1.0.pre42 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre41 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre40 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre39 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre38 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre37 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre36 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre35 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre34 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre33 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre32 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre31 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre30 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre29 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre28 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre27 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre26 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre25 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre24 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre23 spec/models/exemplify_spec.rb