Skip to content

Commit

Permalink
Merge pull request #5433 from parthaa/unit-fix
Browse files Browse the repository at this point in the history
Refs #7887 - Improves a test in repository_test
  • Loading branch information
parthaa committed Aug 21, 2015
2 parents 5182450 + cebec01 commit 9b71bfb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/models/repository_test.rb
Expand Up @@ -268,12 +268,14 @@ def test_as_json
end

def test_units_for_removal_yum
rpms = @fedora_17_x86_64.rpms.sample(2).sort
rpms = @fedora_17_x86_64.rpms.sample(2)
rpm_ids = rpms.map(&:id).sort
rpm_uuids = rpms.map(&:uuid).sort

refute_empty rpms
assert_equal rpms, @fedora_17_x86_64.units_for_removal(rpms.map(&:id)).sort
assert_equal rpms, @fedora_17_x86_64.units_for_removal(rpms.map(&:id).map(&:to_s)).sort
assert_equal rpms, @fedora_17_x86_64.units_for_removal(rpms.map(&:uuid)).sort
assert_equal rpm_ids, @fedora_17_x86_64.units_for_removal(rpm_ids).map(&:id).sort
assert_equal rpm_ids, @fedora_17_x86_64.units_for_removal(rpm_ids.map(&:to_s)).map(&:id).sort
assert_equal rpm_uuids, @fedora_17_x86_64.units_for_removal(rpm_uuids).map(&:uuid).sort
end

def test_units_for_removal_puppet
Expand Down

0 comments on commit 9b71bfb

Please sign in to comment.