Sha256: c4462b7224a39e3906d917ba919fc11836f6ed84ab5df4ce73a02625b25efa0f

Contents?: true

Size: 629 Bytes

Versions: 46

Compression:

Stored size: 629 Bytes

Contents

require 'spec_helper'

describe CurationConcerns::UrlHelper do
  let(:profile) { ["{}"] }
  let(:work) { create(:generic_work) }
  let(:document) { SolrDocument.new(work.to_solr) }
  subject { helper.url_for_document document }

  it { is_expected.to eq "/concern/generic_works/#{work.id}" }

  it 'uses the curation_concern namespace' do
    expect(helper.url_for_document(document)).to eq "/concern/generic_works/#{work.id}"
  end

  context 'when document is a FileSet' do
    let(:file) { create(:file_set) }
    subject { helper.url_for_document file }
    it { is_expected.to eq "/concern/file_sets/#{file.id}" }
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
curation_concerns-1.6.3 spec/helpers/url_helper_spec.rb
curation_concerns-1.6.2 spec/helpers/url_helper_spec.rb
curation_concerns-1.6.1 spec/helpers/url_helper_spec.rb
curation_concerns-1.6.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.5.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.4.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.3.3 spec/helpers/url_helper_spec.rb
curation_concerns-1.3.2 spec/helpers/url_helper_spec.rb
curation_concerns-1.3.1 spec/helpers/url_helper_spec.rb
curation_concerns-1.3.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.2.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.1.2 spec/helpers/url_helper_spec.rb
curation_concerns-1.1.1 spec/helpers/url_helper_spec.rb
curation_concerns-1.1.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0.beta10 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0.beta9 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0.beta8 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0.beta7 spec/helpers/url_helper_spec.rb
curation_concerns-1.0.0.beta6 spec/helpers/url_helper_spec.rb