summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-09-04 20:01:58 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-04 22:46:49 +0200
commit2eac1537ad907f2f7e628788cf980cb7e48d3f56 (patch)
treeab22cb6965bbf1bf111cb9a8788524ac392f7f03 /spec/finders
parentca538899b66a6a82582d2d590297cfef1d310dcf (diff)
downloadgitlab-ce-2eac1537ad907f2f7e628788cf980cb7e48d3f56.tar.gz
Fetch children using new finder for the `show` of a group.
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/group_children_finder_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/finders/group_children_finder_spec.rb b/spec/finders/group_children_finder_spec.rb
index afd96e27a1d..a2a24b2a12e 100644
--- a/spec/finders/group_children_finder_spec.rb
+++ b/spec/finders/group_children_finder_spec.rb
@@ -52,16 +52,16 @@ describe GroupChildrenFinder do
describe '#total_count' do
it 'counts the array children were already loaded' do
- finder.instance_variable_set(:@children, [double])
+ finder.instance_variable_set(:@children, [build(:project)])
- expect(finder).not_to receive(:child_groups)
+ expect(finder).not_to receive(:subgroups)
expect(finder).not_to receive(:projects)
expect(finder.total_count).to eq(1)
end
it 'performs a count without loading children when they are not loaded yet' do
- expect(finder).to receive(:child_groups).and_call_original
+ expect(finder).to receive(:subgroups).and_call_original
expect(finder).to receive(:projects).and_call_original
expect(finder.total_count).to eq(2)