Sha256: 5d6150a2f9b67447550986cd574da57a79009c3051f3762aa343d9944f44d35a
Contents?: true
Size: 1.17 KB
Versions: 24
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe CurationConcerns::Renderers::DateAttributeRenderer do subject { Nokogiri::HTML(renderer.render) } let(:expected) { Nokogiri::HTML(tr_content) } describe "#attribute_to_html" do context 'with embargo release date' do let(:field) { :embargo_release_date } let(:renderer) { described_class.new(field, ['2013-03-14T00:00:00Z']) } let(:tr_content) {%( <tr><th>Embargo release date</th> <td><ul class="tabular"> <li class="attribute embargo_release_date">03/14/2013</li> </ul></td></tr> )} it { expect(renderer).not_to be_microdata(field) } it { expect(subject).to be_equivalent_to(expected) } end context 'with lease expiration date' do let(:field) { :lease_expiration_date } let(:renderer) { described_class.new(field, ['2013-03-14T00:00:00Z']) } let(:tr_content) {%( <tr><th>Lease expiration date</th> <td><ul class="tabular"> <li class="attribute lease_expiration_date">03/14/2013</li> </ul></td></tr> )} it { expect(renderer).not_to be_microdata(field) } it { expect(subject).to be_equivalent_to(expected) } end end end
Version data entries
24 entries across 24 versions & 1 rubygems