Sha256: f749d68f3367b2a88098a61ce17f0bda1465d1b3491344d50539f2df8a57dce0

Contents?: true

Size: 874 Bytes

Versions: 28

Compression:

Stored size: 874 Bytes

Contents

require File.dirname(__FILE__) + '/../../test_helper'

class Admin::Muck::DefaultControllerTest < ActionController::TestCase

  tests Admin::DefaultController

  context "GET to admin index" do
    setup do
      @user = stub(:display_name => 'test')
      @controller.stubs(:current_user).returns(@user)
      @controller.stubs(:login_required).returns(true)
      @controller.stubs(:admin_access_required).returns(true)
      get :index
    end
    should_respond_with :success
    should_render_template :index
  end

  # TODO add tests to confirm admin UI access requires login and role 'administrator'
  # context "GET to admin index not logged in" do
  #   setup do
  #     @controller.stubs(:login_required).returns(false)
  #     @controller.stubs(:admin_access_required).returns(false)
  #     get :index
  #   end
  #   should_respond_with :redirect
  # end
  
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
muck-engine-0.4.26 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.25 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.24 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.23 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.21 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.17 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.16 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.15 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.14 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.13 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.12 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.11 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.10 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.9 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.8 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.7 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.6 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.5 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.4 test/rails_root/test/functional/admin/default_controller_test.rb
muck-engine-0.4.3 test/rails_root/test/functional/admin/default_controller_test.rb