Commit f53ea36d authored by Valerie Burton's avatar Valerie Burton

Remove unnecessary group reloads

parent 85bcc222
......@@ -128,11 +128,6 @@ RSpec.shared_examples 'namespace traversal scopes' do
context 'with offset and limit' do
subject { described_class.where(id: [deep_nested_group_1, deep_nested_group_2]).order(:traversal_ids).offset(1).limit(1).self_and_ancestors }
before do
deep_nested_group_1.reload
deep_nested_group_2.reload
end
it { is_expected.to contain_exactly(group_2, nested_group_2, deep_nested_group_2) }
end
......@@ -197,11 +192,6 @@ RSpec.shared_examples 'namespace traversal scopes' do
.pluck(:id)
end
before do
deep_nested_group_1.reload
deep_nested_group_2.reload
end
it { is_expected.to contain_exactly(group_2.id, nested_group_2.id, deep_nested_group_2.id) }
end
end
......@@ -253,11 +243,6 @@ RSpec.shared_examples 'namespace traversal scopes' do
context 'with offset and limit' do
subject { described_class.where(id: [group_1, group_2]).order(:traversal_ids).offset(1).limit(1).self_and_descendants }
before do
group_1.reload
group_2.reload
end
it { is_expected.to contain_exactly(group_2, nested_group_2, deep_nested_group_2) }
end
......@@ -311,11 +296,6 @@ RSpec.shared_examples 'namespace traversal scopes' do
.pluck(:id)
end
before do
group_1.reload
group_2.reload
end
it { is_expected.to contain_exactly(group_2.id, nested_group_2.id, deep_nested_group_2.id) }
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