Add test for rule from trigger/action with and without `_` as namespace.

This disallows creating rule from trigger and action without having to fully qualify the entity names in the API request.

- some refactoring to make better use of ScalaTest matchers.
2 files changed