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