diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-08-10 20:30:42 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-08-10 20:41:05 +0200 |
commit | 74e39b8ffaeea5ff360e7290a0a90e4e967e46fc (patch) | |
tree | 572168a3e007bb95731689d0fbaa709d368b101f /test |
Diffstat (limited to 'test')
-rw-r--r-- | test/factories/foreman_params_tab_factories.rb | 5 | ||||
-rw-r--r-- | test/test_plugin_helper.rb | 6 | ||||
-rw-r--r-- | test/unit/foreman_params_tab_test.rb | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/test/factories/foreman_params_tab_factories.rb b/test/factories/foreman_params_tab_factories.rb new file mode 100644 index 0000000..beaac0d --- /dev/null +++ b/test/factories/foreman_params_tab_factories.rb @@ -0,0 +1,5 @@ +FactoryGirl.define do + factory :host do + name 'foreman_params_tab' + end +end diff --git a/test/test_plugin_helper.rb b/test/test_plugin_helper.rb new file mode 100644 index 0000000..4d59d38 --- /dev/null +++ b/test/test_plugin_helper.rb @@ -0,0 +1,6 @@ +# This calls the main test_helper in Foreman-core +require 'test_helper' + +# Add plugin to FactoryGirl's paths +FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories') +FactoryGirl.reload diff --git a/test/unit/foreman_params_tab_test.rb b/test/unit/foreman_params_tab_test.rb new file mode 100644 index 0000000..9217cb9 --- /dev/null +++ b/test/unit/foreman_params_tab_test.rb @@ -0,0 +1,11 @@ +require 'test_plugin_helper' + +class ForemanParamsTabTest < ActiveSupport::TestCase + setup do + User.current = User.find_by_login 'admin' + end + + test 'the truth' do + assert true + end +end |