Adding tests for rules stored in database.