Sha256: 3bc33056c94bae0f57414409159edbc70dcd68ec4e29fa59ae1e14e751a78893

Contents?: true

Size: 673 Bytes

Versions: 6

Compression:

Stored size: 673 Bytes

Contents

require "test_helper"

=begin

  What's being tested here?

    - Resource controller (which is not associated with a model).

=end

class Admin::StatusControllerTest < ActionController::TestCase

  test "admin has access" do
    admin_sign_in
    get :index
    assert_response :success
    assert_template 'index'
  end

  test "editor should not have access" do
    editor_sign_in
    get :index
    assert_response :unprocessable_entity
  end

  test "not logged in user is redirected to new_admin_session_path" do
    reset_session
    get :index
    assert_response :redirect
    assert_redirected_to new_admin_session_path # (:back_to => '/admin/status')
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
typus-3.1.0.rc6 test/app/controllers/admin/status_controller_test.rb
typus-3.1.0.rc5 test/app/controllers/admin/status_controller_test.rb
typus-3.1.0.rc4 test/app/controllers/admin/status_controller_test.rb
typus-3.1.0.rc3 test/app/controllers/admin/status_controller_test.rb
typus-3.1.0.rc2 test/app/controllers/admin/status_controller_test.rb
typus-3.1.0.rc1 test/app/controllers/admin/status_controller_test.rb