Sha256: 6026524b8e1e17d41fbf7f1cdb557abe5f5cb747b5f7f326ed1dc81d2e358cc9
Contents?: true
Size: 1.12 KB
Versions: 8
Compression:
Stored size: 1.12 KB
Contents
require 'spec_helper' describe PagesController do before(:each) do @default_language = Language.get_default @default_language_root = Factory(:language_root_page, :language => @default_language, :name => 'Home', :public => true) end context "requested for a page containing a feed" do before(:each) do @page = Factory(:public_page, :parent_id => @default_language_root.id, :page_layout => 'news', :name => 'News', :language => @default_language) end it "should render a rss feed" do get :show, :urlname => 'news', :format => :rss response.content_type.should == 'application/rss+xml' end it "should include content" do pending "I didn't figured out how to test XML response bodies" @page.elements.first.content_by_name('news_headline').essence.update_attributes({:body => 'Peters Petshop'}) get :show, :urlname => 'news', :format => :rss response.body.should match /Peters Petshop/ end end context "requested for a page that does not contain a feed" do it "should render xml 404 error" do get :show, :urlname => 'home', :format => :rss response.status.should == 404 end end end
Version data entries
8 entries across 8 versions & 1 rubygems