Sha256: 6827c6fc77bd81825c4b7aa2bd54c58525fb11e46168d4c9c49b3c37d9c28b76

Contents?: true

Size: 798 Bytes

Versions: 3

Compression:

Stored size: 798 Bytes

Contents

require 'test_helper'

class LoggedExceptionsControllerTest < ActionController::TestCase

  #FIXME test the tests for the LoggedExceptionsControlledTest
=begin
  context "for not-admin user" do

    setup do
      activate_authlogic
      UserSession.create(@user = User.make)
    end

    context "to show logged exception" do
      setup { get :index }
      should_respond_with :redirect
      should_redirect_to('the default page') { root_url }
      #should_set_the_flash_to /prístup/
    end
  end
=end
  context "for admin user" do

    setup do
      activate_authlogic
      @user = User.make
      @user.has_role!(:admin)
      UserSession.create(@user)
    end

    context "to show logged exception" do
      setup { get :index }
      should_respond_with :success
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solarsearch-0.0.10 test/functional/restricted_logged_exceptions_controller_test.rb
solarsearch-0.0.9 test/functional/restricted_logged_exceptions_controller_test.rb
solarsearch-0.0.6 test/functional/restricted_logged_exceptions_controller_test.rb