Sha256: 03971668577ec42c2e9135095bdb87836ae77bd314868ae697d257e466c9322d

Contents?: true

Size: 594 Bytes

Versions: 3

Compression:

Stored size: 594 Bytes

Contents

require 'spec_helper'

describe CollectionsSearchHelper, :type => :helper do
  describe "collection_name" do
    let (:collection_without_title) { Collection.create() }
    let (:collection_with_title) { Collection.create(title: "Title of Collection 2") }
    it "should return the pid if no title available" do
      expect(collection_name(collection_without_title.pid)).to eq(collection_without_title.pid)
    end
    it "should return the title value associated with the given pid" do
      expect(collection_name(collection_with_title.pid)).to eq("Title of Collection 2")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hydra-collections-3.0.0.beta3 spec/helpers/collections_search_helper_spec.rb
hydra-collections-2.0.5 spec/helpers/collections_search_helper_spec.rb
hydra-collections-2.0.4 spec/helpers/collections_search_helper_spec.rb