Sha256: e0e418d1d399d85db299209a83d56702d2894265c67a50520328fbaf526d49da
Contents?: true
Size: 966 Bytes
Versions: 5
Compression:
Stored size: 966 Bytes
Contents
require 'spec_helper' describe MetaTags::ViewHelper, 'displaying Open Search meta tags' do subject { ActionView::Base.new } it 'should display meta tags specified with :open_search' do subject.set_meta_tags(open_search: { title: 'Open Search Title', href: '/open_search_path.xml' }) subject.display_meta_tags(site: 'someSite').tap do |meta| expect(meta).to have_tag('link', with: { href: '/open_search_path.xml', rel: 'search', title: 'Open Search Title', type: 'application/opensearchdescription+xml', }) end end it 'should not display meta tags without content' do subject.set_meta_tags(open_search: { title: '', href: '', }) subject.display_meta_tags(site: 'someSite').tap do |meta| expect(meta).to_not have_tag('link', with: { rel: 'search', type: 'application/opensearchdescription+xml', }) end end end
Version data entries
5 entries across 5 versions & 2 rubygems