Sha256: f9945e68ba95b811ca91775012e2db44f642569ae00fe84fa6b484488843ea72

Contents?: true

Size: 1.51 KB

Versions: 4

Compression:

Stored size: 1.51 KB

Contents

require 'rails_helper'

describe Item do
  # pending "add some examples to (or delete) #{__FILE__}"
  fixtures :all

  it "should have library_url" do
    items(:item_00001).library_url.should eq "#{LibraryGroup.site_config.url}libraries/web"
  end

  it "should not create item without manifestation_id" do
    item = items(:item_00001)
    item.manifestation_id = nil
    item.valid?.should be_falsy
  end
end

# == Schema Information
#
# Table name: items
#
#  id                      :integer          not null, primary key
#  call_number             :string
#  item_identifier         :string
#  created_at              :datetime
#  updated_at              :datetime
#  deleted_at              :datetime
#  shelf_id                :integer          default(1), not null
#  include_supplements     :boolean          default(FALSE), not null
#  note                    :text
#  url                     :string
#  price                   :integer
#  lock_version            :integer          default(0), not null
#  required_role_id        :integer          default(1), not null
#  required_score          :integer          default(0), not null
#  acquired_at             :datetime
#  bookstore_id            :integer
#  budget_type_id          :integer
#  circulation_status_id   :integer          default(5), not null
#  checkout_type_id        :integer          default(1), not null
#  binding_item_identifier :string
#  binding_call_number     :string
#  binded_at               :datetime
#  manifestation_id        :integer          not null
#

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
enju_biblio-0.3.6 spec/models/item_spec.rb
enju_biblio-0.3.5 spec/models/item_spec.rb
enju_biblio-0.3.4 spec/models/item_spec.rb
enju_biblio-0.3.3 spec/models/item_spec.rb