Skip to content

Create test helpers for policies to test for actions and actions on objects #33

@rreinhardt9

Description

@rreinhardt9

It would be really helpful to have a quick way to test that a policy implements given actions or actions on objects. Currently we have to do something like:

    it "has the expected actions" do
      user = build(:user)
      policy = AccessControl::RolePolicy.new(user)
      expect(policy).to respond_to(:create_edit_roles?, :manage?)
    end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions