Sha256: 2dc8ec49e8ae5f54e1835922ca884fce91b9b3a585e7b1a92490d6a37a9e767f

Contents?: true

Size: 737 Bytes

Versions: 9

Compression:

Stored size: 737 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::All::Rss do
  it 'should render recent.rss' do
    rendered = Card[:recent].format(:rss).show( nil, {} )
    expect(rendered).to match(/xml/)
  end

  it 'should handle faulty search queries' do
    bad_search = Card.create! name: 'Bad Search', type: 'Search', content: 'not no search'
    rendered = bad_search.format(:rss).render_feed_body
    expect(rendered).to have_tag("item",:text => /JSON::ParserError/)
  end

  it 'should handle bad queries' do
    bad_search = Card.create! :name=>'Bad Search', :type=>'Search', :content=>'{"found_by":"home"}'
    rendered = bad_search.format(:rss).render_feed_body
    expect(rendered).to have_tag("item",:text => /Card::BadQuery/)
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
card-1.16.15 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.14 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.13 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.12 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.11 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.10 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.9 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.8 mod/02_basic_types/spec/set/all/rss_spec.rb
card-1.16.7 mod/02_basic_types/spec/set/all/rss_spec.rb