Sha256: d4b30a0b98a1472e05affc5ea118e7e9941701686e2c3d910f577108a79001ff
Contents?: true
Size: 852 Bytes
Versions: 46
Compression:
Stored size: 852 Bytes
Contents
# This class exists to provide a test for including page behavior in controllers. # I didn't know of a way to add functional tests for controllers/routes that aren't in # the apps directory. # # This should be moved to the test directory if possible. class Tests::PretendController < ApplicationController include Cms::Acts::ContentPage requires_permission_for_section "/members", :only=>[:restricted] RESTRICTED_H1 = "Restricted" def restricted render :text =>"<h1>#{RESTRICTED_H1}</h1> You can see this restricted page." end def open render :text =>"<h1>Open Page</h1> You can see this public page." end def error raise StandardError end def not_found raise ActiveRecord::RecordNotFound.new("This thing was missing!") end def open_with_layout render :layout=>"templates/subpage" end end
Version data entries
46 entries across 46 versions & 6 rubygems