Sha256: af18d95b7cf94210aec6b88970973633594534ef8fa354fe22f8c453a0906612

Contents?: true

Size: 591 Bytes

Versions: 16

Compression:

Stored size: 591 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.id)).to eq collection_without_title.id
    end

    it "should return the title value associated with the given pid" do
      expect(collection_name(collection_with_title.id)).to eq "Title of Collection 2"
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
hydra-collections-7.0.0 spec/helpers/collections_search_helper_spec.rb
hydra-collections-5.0.4 spec/helpers/collections_search_helper_spec.rb
hydra-collections-6.0.0 spec/helpers/collections_search_helper_spec.rb
hydra-collections-6.0.0.rc2 spec/helpers/collections_search_helper_spec.rb
hydra-collections-6.0.0.rc1 spec/helpers/collections_search_helper_spec.rb
hydra-collections-5.0.3 spec/helpers/collections_search_helper_spec.rb
hydra-collections-6.0.0.alpha spec/helpers/collections_search_helper_spec.rb
hydra-collections-5.0.2 spec/helpers/collections_search_helper_spec.rb
hydra-collections-5.0.1 spec/helpers/collections_search_helper_spec.rb
hydra-collections-5.0.0 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0.rc3 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0.rc2 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0.rc1 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0.beta4 spec/helpers/collections_search_helper_spec.rb
hydra-collections-4.0.0.beta3 spec/helpers/collections_search_helper_spec.rb