diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-06-14 19:14:10 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-06-14 19:14:10 +0200 |
commit | be945de33c794a449c5fcbf991db4bf0d49b1fb7 (patch) | |
tree | 477c5f4b708e37200f9042e206e4d7874d2eeae7 /test |
Diffstat (limited to 'test')
-rw-r--r-- | test/factories/foreman_image_upload_factories.rb | 5 | ||||
-rw-r--r-- | test/test_plugin_helper.rb | 6 | ||||
-rw-r--r-- | test/unit/foreman_image_upload_test.rb | 11 |
3 files changed, 22 insertions, 0 deletions
diff --git a/test/factories/foreman_image_upload_factories.rb b/test/factories/foreman_image_upload_factories.rb new file mode 100644 index 0000000..722eb4d --- /dev/null +++ b/test/factories/foreman_image_upload_factories.rb @@ -0,0 +1,5 @@ +FactoryGirl.define do + factory :host do + name 'foreman_image_upload' + 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_image_upload_test.rb b/test/unit/foreman_image_upload_test.rb new file mode 100644 index 0000000..bb7c411 --- /dev/null +++ b/test/unit/foreman_image_upload_test.rb @@ -0,0 +1,11 @@ +require 'test_plugin_helper' + +class ForemanImageUploadTest < ActiveSupport::TestCase + setup do + User.current = User.find_by_login 'admin' + end + + test 'the truth' do + assert true + end +end |