Sha256: d5127be19fb85d8ab444b797c51868f2514e8356e5a831784504b5a83f2330a8
Contents?: true
Size: 920 Bytes
Versions: 2
Compression:
Stored size: 920 Bytes
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 "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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cms-lite-0.4.0 | test/rails_root/test/functional/cms_lite_controller_test.rb |
cms-lite-0.4.1 | test/rails_root/test/functional/cms_lite_controller_test.rb |