Skip to content
This repository has been archived by the owner on May 5, 2018. It is now read-only.

Fixes #21536 - start using factory bot #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/factories/jenkins_instance_related_factory.rb
@@ -1,4 +1,4 @@
FactoryGirl.define do
FactoryBot.define do
factory :pipeline_organization, :class => Organization do
sequence(:name) { |n| "pipeline_organization#{n}"}
end
Expand Down
6 changes: 3 additions & 3 deletions test/foreman_pipeline_test_helper.rb
@@ -1,8 +1,8 @@
require "test_helper"

FactoryGirl.definition_file_paths << File.join(Katello::Engine.root, 'test', 'factories')
FactoryGirl.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
FactoryGirl.reload
FactoryBot.definition_file_paths << File.join(Katello::Engine.root, 'test', 'factories')
FactoryBot.definition_file_paths << File.join(File.dirname(__FILE__), 'factories')
FactoryBot.reload

require "#{Katello::Engine.root}/test/support/fixtures_support"
require "fixtures_support"
Expand Down
12 changes: 6 additions & 6 deletions test/models/job_test.rb
Expand Up @@ -4,12 +4,12 @@ class JobTest < ActiveSupport::TestCase

def setup
@organization = get_organization
@compute_resource = FactoryGirl.create(:compute_resource, :libvirt)
@hostgroup = FactoryGirl.create(:hostgroup)
@content_view = FactoryGirl.create(:katello_content_view)
@jenkins_user = FactoryGirl.create(:jenkins_user, :organization => get_organization)
@jenkins_instance = FactoryGirl.create(:jenkins_instance, :jenkins_user => @jenkins_user, :organization => get_organization)
@environment = FactoryGirl.create(:katello_environment, :library)
@compute_resource = FactoryBot.create(:compute_resource, :libvirt)
@hostgroup = FactoryBot.create(:hostgroup)
@content_view = FactoryBot.create(:katello_content_view)
@jenkins_user = FactoryBot.create(:jenkins_user, :organization => get_organization)
@jenkins_instance = FactoryBot.create(:jenkins_instance, :jenkins_user => @jenkins_user, :organization => get_organization)
@environment = FactoryBot.create(:katello_environment, :library)
end

test "should find target cv" do
Expand Down