Project

General

Profile

Actions

Refactor #16990

closed

Break apart AccessPermissionTest for easier plugin reuse

Added by Justin Sherrill about 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

Right now if a plugin wants to implement a similar test to the AccessPermissionsTest, it has to redefine all the constants here:

https://github.com/theforeman/foreman/blob/develop/test/unit/foreman/access_permissions_test.rb#L14

if there are any routes added without a namespace (such as adding a new action to the hosts api). If a test tries to require that file, the test is actually executed and if there are additional items that need to be white listed, those will fail.

Actions

Also available in: Atom PDF