Commit dacc6d47 authored by Jason Goodman's avatar Jason Goodman

Refactor a spec

parent ccb17f83
......@@ -20,11 +20,9 @@ RSpec.describe EE::IpRestrictions::UpdateService do
end
it 'builds new ip_restriction records with the provided ranges' do
expect(group.ip_restrictions).to be_empty
subject
expect(group.ip_restrictions.map(&:range)).to contain_exactly(*comma_separated_ranges.split(','))
expect { subject }
.to(change { group.ip_restrictions.map(&:range) }
.from([]).to(contain_exactly(*comma_separated_ranges.split(","))))
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment