summaryrefslogtreecommitdiff
path: root/spec/presenters/snippet_blob_presenter_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 15:09:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 15:09:28 +0000
commit14fb5a922285d71fea67de59164ee4bb81ee3486 (patch)
treed3f585c54feb676aec2f14cc85fe32d615fd7fc0 /spec/presenters/snippet_blob_presenter_spec.rb
parentd9b0b3243e3cd71a08ff5d4035b7882cc7a5a35f (diff)
downloadgitlab-ce-14fb5a922285d71fea67de59164ee4bb81ee3486.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters/snippet_blob_presenter_spec.rb')
-rw-r--r--spec/presenters/snippet_blob_presenter_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/presenters/snippet_blob_presenter_spec.rb b/spec/presenters/snippet_blob_presenter_spec.rb
index 7464c0ac15b..00bdb982147 100644
--- a/spec/presenters/snippet_blob_presenter_spec.rb
+++ b/spec/presenters/snippet_blob_presenter_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe SnippetBlobPresenter do
subject { described_class.new(snippet.blob).rich_data }
context 'with PersonalSnippet' do
- let(:raw_url) { "http://127.0.0.1:3000/snippets/#{snippet.id}/raw" }
+ let(:raw_url) { "http://127.0.0.1:3000/-/snippets/#{snippet.id}/raw" }
let(:snippet) { build(:personal_snippet) }
it 'returns nil when the snippet blob is binary' do
@@ -40,7 +40,7 @@ RSpec.describe SnippetBlobPresenter do
let(:snippet) { create(:personal_snippet, file_name: 'test.ipynb') }
it 'returns rich notebook content' do
- expect(subject.strip).to eq %Q(<div class="file-content" data-endpoint="/snippets/#{snippet.id}/raw" id="js-notebook-viewer"></div>)
+ expect(subject.strip).to eq %Q(<div class="file-content" data-endpoint="/-/snippets/#{snippet.id}/raw" id="js-notebook-viewer"></div>)
end
end
@@ -48,7 +48,7 @@ RSpec.describe SnippetBlobPresenter do
let(:snippet) { create(:personal_snippet, file_name: 'openapi.yml') }
it 'returns rich openapi content' do
- expect(subject).to eq %Q(<div class="file-content" data-endpoint="/snippets/#{snippet.id}/raw" id="js-openapi-viewer"></div>\n)
+ expect(subject).to eq %Q(<div class="file-content" data-endpoint="/-/snippets/#{snippet.id}/raw" id="js-openapi-viewer"></div>\n)
end
end
@@ -131,7 +131,7 @@ RSpec.describe SnippetBlobPresenter do
let(:snippet) { project_snippet }
it 'returns the raw path' do
- expect(subject).to eq "/#{snippet.project.full_path}/snippets/#{snippet.id}/raw"
+ expect(subject).to eq "/#{snippet.project.full_path}/-/snippets/#{snippet.id}/raw"
end
end
@@ -139,7 +139,7 @@ RSpec.describe SnippetBlobPresenter do
let(:snippet) { personal_snippet }
it 'returns the raw path' do
- expect(subject).to eq "/snippets/#{snippet.id}/raw"
+ expect(subject).to eq "/-/snippets/#{snippet.id}/raw"
end
end
end