From cf5edfa25e9fd6255043440fdd4755dd78875235 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 30 Oct 2023 15:01:47 +0100 Subject: [PATCH] Run permissions tests from Foreman core --- lib/tasks/foreman_plugin_template_tasks.rake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/tasks/foreman_plugin_template_tasks.rake b/lib/tasks/foreman_plugin_template_tasks.rake index 48c73c8..6760747 100644 --- a/lib/tasks/foreman_plugin_template_tasks.rake +++ b/lib/tasks/foreman_plugin_template_tasks.rake @@ -13,11 +13,10 @@ end # Tests namespace :test do desc 'Test ForemanPluginTemplate' - Rake::TestTask.new(:foreman_plugin_template) do |t| - test_dir = File.expand_path('../../test', __dir__) - t.libs << 'test' - t.libs << test_dir - t.pattern = "#{test_dir}/**/*_test.rb" + Rake::TestTask.new(:foreman_plugin_template => 'db:test:prepare') do |t| + t.libs << ForemanPluginTemplate::Engine.root.join('test') + t.pattern = ForemanPluginTemplate::Engine.root.join('test', '**', '*_test.rb') + t.test_files = [Rails.root.join('test/unit/foreman/access_permissions_test.rb')] t.verbose = true t.warning = false end