Sha256: 6d9db14bfadae279d686f7e24c4cfb488661ac4ad28b2aa91749d15a3ed38855

Contents?: true

Size: 980 Bytes

Versions: 34

Compression:

Stored size: 980 Bytes

Contents

require 'spec_helper'

describe CurationConcerns::Renderers::RightsAttributeRenderer do
  let(:field) { :rights }
  let(:renderer) { described_class.new(field, ['http://creativecommons.org/licenses/by/3.0/us/', 'http://creativecommons.org/licenses/by-nd/3.0/us/']) }

  describe "#attribute_to_html" do
    subject { Nokogiri::HTML(renderer.render) }
    let(:expected) { Nokogiri::HTML(tr_content) }

    let(:tr_content) {
      "<tr><th>Rights</th>\n" \
       "<td><ul class='tabular'>\n" \
       "<li class=\"attribute rights\"><a href=\"http://creativecommons.org/licenses/by/3.0/us/\" target=\"_blank\">Attribution 3.0 United States</a></li>\n" \
       "<li class=\"attribute rights\"><a href=\"http://creativecommons.org/licenses/by-nd/3.0/us/\" target=\"_blank\">Attribution-NoDerivs 3.0 United States</a></li>\n" \
       "</ul></td></tr>"
    }
    it { expect(renderer).not_to be_microdata(field) }
    it { expect(subject).to be_equivalent_to(expected) }
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
curation_concerns-1.7.8 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.7 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-2.0.0 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-2.0.0.rc2 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.6 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.5 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.4 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.3 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.2 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-2.0.0.rc1 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.1 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.0 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.7.0.beta1 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.6.3 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.6.2 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.6.1 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.6.0 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.5.0 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.4.0 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb
curation_concerns-1.3.3 spec/renderers/curation_concerns/renderers/rights_attribute_renderer_spec.rb