Sha256: 54952180845ac7b2ef5db27691524de01a3f884035c50475090b5bfbb3a33d15

Contents?: true

Size: 710 Bytes

Versions: 10

Compression:

Stored size: 710 Bytes

Contents

require "test_helper"

=begin

  What's being tested here?

    - Access to user_guide.
    - ...

=end

class Admin::BaseControllerTest < ActionController::TestCase

  context "non-authenticated" do

    should "not be able to get the user_guide" do
      get :user_guide
      assert_response :redirect
      assert_redirected_to new_admin_session_path(:back_to => '/admin/user_guide')
    end

  end

  context "authenticated" do

    setup do
      @request.session[:typus_user_id] = Factory(:typus_user).id
    end

    teardown do
      @request.session[:typus_user_id] = nil
    end

    should "be able to get the user_guide" do
      get :user_guide
      assert_response :success
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
typus-3.0.11 test/app/controllers/admin/base_controller_test.rb
typus-3.0.11.rc5 test/app/controllers/admin/base_controller_test.rb
typus-3.0.11.rc4 test/app/controllers/admin/base_controller_test.rb
typus-3.0.11.rc3 test/app/controllers/admin/base_controller_test.rb
typus-3.0.11.rc2 test/app/controllers/admin/base_controller_test.rb
typus-3.0.11.rc1 test/app/controllers/admin/base_controller_test.rb
typus-3.0.10 test/app/controllers/admin/base_controller_test.rb
typus-3.0.9 test/app/controllers/admin/base_controller_test.rb
typus-3.0.8 test/app/controllers/admin/base_controller_test.rb
typus-3.0.7 test/app/controllers/admin/base_controller_test.rb