Sha256: 57956cf2a74483a945383471dbef3a6b838195b26192f0445047a2dd02e213d1

Contents?: true

Size: 1.03 KB

Versions: 45

Compression:

Stored size: 1.03 KB

Contents

Feature: Authorizing Access using Pundit

  Background:
    Given I am logged in
    And 1 post exists
    And a configuration of:
    """
    require 'pundit'

    ActiveAdmin.application.namespace(:admin).authorization_adapter = ActiveAdmin::PunditAdapter

    ActiveAdmin.register Post do
    end

    ActiveAdmin.register_page "No Access" do
    end
    """
    And I am on the index page for posts

  @allow-rescue
  Scenario: Attempt to access a resource I am not authorized to see
    When I go to the last post's edit page
    Then I should see "You are not authorized to perform this action"

  Scenario: Viewing the default action items
    When I follow "View"
    Then I should not see an action item link to "Edit"

  @allow-rescue
  Scenario: Attempting to visit a Page without authorization
    When I go to the admin no access page
    Then I should see "You are not authorized to perform this action"

  @allow-rescue
  Scenario: Viewing a page with authorization
    When I go to the admin dashboard page
    Then I should see "Dashboard"

Version data entries

45 entries across 45 versions & 8 rubygems

Version Path
yousty-activeadmin-1.0.15.pre features/authorization_pundit.feature
activeadmin-1.0.0 features/authorization_pundit.feature
activeadmin-1.0.0.pre5 features/authorization_pundit.feature
activeadmin-orac-1.0.0.pre4 features/authorization_pundit.feature
activeadmin-orac-1.0.0 features/authorization_pundit.feature
activeadmin-orac-1.0.0.pre.orac features/authorization_pundit.feature
yousty-activeadmin-1.0.14.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.13.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.12.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.11.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.10.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.9.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.8.pre features/authorization_pundit.feature
activeadmin-1.0.0.pre4 features/authorization_pundit.feature
activeadmin-1.0.0.pre3 features/authorization_pundit.feature
activeadmin-1.0.0.pre2 features/authorization_pundit.feature
activeadmin-1.0.0.pre1 features/authorization_pundit.feature
yousty-activeadmin-1.0.7.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.6.pre features/authorization_pundit.feature
yousty-activeadmin-1.0.5.pre features/authorization_pundit.feature