Sha256: 5f808895934faf31cf2d99f510f7c37c2b8c0d0915ffe2f6cadc9d4963648297
Contents?: true
Size: 1.08 KB
Versions: 7
Compression:
Stored size: 1.08 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' class CmsLiteControllerTest < ActionController::TestCase tests CmsLiteController context "cms lite controller" do context "unprotected pages" do setup do get :show_page, :content_key => 'open', :content_page => ['hello'] end should_respond_with :success end context "unprotected root pages" do setup do get :show_page, :content_key => '/default', :content_page => 'root' end should_respond_with :success end context "protected pages"do context "not logged in" do setup do get :show_protected_page, :content_key => 'protected', :content_page => ['safe-hello'] end should_redirect_to("login") { login_path } end context "logged in" do setup do activate_authlogic @user = Factory(:user) login_as @user get :show_protected_page, :content_key => 'protected', :content_page => ['safe-hello'] end should_respond_with :success end end end end
Version data entries
7 entries across 7 versions & 1 rubygems