summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrasimir Angelov <kangelov@gitlab.com>2019-09-11 12:10:40 +1200
committerKrasimir Angelov <kangelov@gitlab.com>2019-09-11 12:10:40 +1200
commit91af0cf4070c4017cd52d8bf621a2d9de1f4b315 (patch)
treefcf896cf05db0185707bb724f8737019985408eb
parent5809400da430287afb9d3c5ea05b7dea216f1c60 (diff)
downloadgitlab-ce-91af0cf4070c4017cd52d8bf621a2d9de1f4b315.tar.gz
Add tests for Project#pages_lookup_path
-rw-r--r--spec/models/project_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index e2a684c42ae..5b4b9c516a0 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -5012,6 +5012,17 @@ describe Project do
end
end
+ describe '#pages_lookup_path' do
+ let(:pages_domain) { build(:pages_domain) }
+ let(:project) { build(:project) }
+
+ it 'returns instance of Pages::LookupPath' do
+ expect(Pages::LookupPath).to receive(:new).with(project, domain: pages_domain).and_call_original
+
+ expect(project.pages_lookup_path(domain: pages_domain)).to be_a(Pages::LookupPath)
+ end
+ end
+
def rugged_config
rugged_repo(project.repository).config
end