summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/banzai/filter/abstract_reference_filter_spec.rb')
-rw-r--r--spec/lib/banzai/filter/abstract_reference_filter_spec.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/banzai/filter/abstract_reference_filter_spec.rb b/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
index 787c2372c5b..27532f96f56 100644
--- a/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
+++ b/spec/lib/banzai/filter/abstract_reference_filter_spec.rb
@@ -23,11 +23,11 @@ describe Banzai::Filter::AbstractReferenceFilter do
doc = Nokogiri::HTML.fragment('')
filter = described_class.new(doc, project: project)
- expect(filter).to receive(:references_per_project).
- and_return({ project.path_with_namespace => Set.new(%w[1]) })
+ expect(filter).to receive(:references_per_project)
+ .and_return({ project.path_with_namespace => Set.new(%w[1]) })
- expect(filter.projects_per_reference).
- to eq({ project.path_with_namespace => project })
+ expect(filter.projects_per_reference)
+ .to eq({ project.path_with_namespace => project })
end
end
@@ -37,26 +37,26 @@ describe Banzai::Filter::AbstractReferenceFilter do
context 'with RequestStore disabled' do
it 'returns a list of Projects for a list of paths' do
- expect(filter.find_projects_for_paths([project.path_with_namespace])).
- to eq([project])
+ expect(filter.find_projects_for_paths([project.path_with_namespace]))
+ .to eq([project])
end
it "return an empty array for paths that don't exist" do
- expect(filter.find_projects_for_paths(['nonexistent/project'])).
- to eq([])
+ expect(filter.find_projects_for_paths(['nonexistent/project']))
+ .to eq([])
end
end
context 'with RequestStore enabled', :request_store do
it 'returns a list of Projects for a list of paths' do
- expect(filter.find_projects_for_paths([project.path_with_namespace])).
- to eq([project])
+ expect(filter.find_projects_for_paths([project.path_with_namespace]))
+ .to eq([project])
end
context "when no project with that path exists" do
it "returns no value" do
- expect(filter.find_projects_for_paths(['nonexistent/project'])).
- to eq([])
+ expect(filter.find_projects_for_paths(['nonexistent/project']))
+ .to eq([])
end
it "adds the ref to the project refs cache" do
@@ -75,8 +75,8 @@ describe Banzai::Filter::AbstractReferenceFilter do
end
it "return an empty array for paths that don't exist" do
- expect(filter.find_projects_for_paths(['nonexistent/project'])).
- to eq([])
+ expect(filter.find_projects_for_paths(['nonexistent/project']))
+ .to eq([])
end
end
end