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.pre62 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre61 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre60 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre59 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre58 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre57 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre56 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre55 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre54 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre53 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre52 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre51 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre50 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre49 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre48 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre47 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre46 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre45 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre44 spec/models/exemplify_spec.rb
enju_biblio-0.1.0.pre43 spec/models/exemplify_spec.rb