Skip to content

Commit

Permalink
Write cleanup-foreman-user-groups test without fixtures
Browse files Browse the repository at this point in the history
This is essentially the same test, but without files.
  • Loading branch information
ekohl committed Aug 27, 2021
1 parent 071cd88 commit 0493a2f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 2 additions & 3 deletions spec/migration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@

%w[foreman katello].each do |scenario_name|
context "foreman drop puppet from user_groups" do
let(:answers_after) { load_fixture_yaml('cleanup-foreman-user-groups', "#{scenario_name}-answers-after.yaml") }
let(:scenario) do
{
:answers => load_fixture_yaml('cleanup-foreman-user-groups', "#{scenario_name}-answers-before.yaml"),
:answers => {'foreman' => {'user_groups' => ['puppet']}},
:config => load_config_yaml("#{scenario_name}.yaml"),
:migrations => config_path("#{scenario_name}.migrations"),
}
Expand All @@ -138,7 +137,7 @@

it 'changes scenario answers' do
_, after = migrator
expect(after).to include answers_after
expect(after).to include({'foreman' => {'user_groups' => []}})
end
end
end
Expand Down

0 comments on commit 0493a2f

Please sign in to comment.