Sha256: 808bc6263d3ca4bbcdc36e8630d2c8ed6e13b20c2e2ca657d7072f063dde5822
Contents?: true
Size: 658 Bytes
Versions: 3
Compression:
Stored size: 658 Bytes
Contents
require 'spec_helper' describe PagesController do render_views before(:all) do @root = Factory.create(:structure_main) @structure = Factory.create(:structure_page, :parent => @root) @page = Factory.create(:page, :structure => @structure) end context "anonymous user" do user_logout it "should render show action" do get :show, :id => @structure.slug assigns(:page).should == @page response.should render_template('show') end it "should render 404 page" do lambda { get :show, :id => 'wrong' }.should raise_error(ActiveRecord::RecordNotFound) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sunrise-core-0.2.2 | spec/controllers/pages_controller_spec.rb |
sunrise-core-0.2.1 | spec/controllers/pages_controller_spec.rb |
sunrise-core-0.2.0 | spec/controllers/pages_controller_spec.rb |