Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2017-06-07 21:33:50 +0300
committerClement Ho <clemmakesapps@gmail.com>2017-06-07 21:33:50 +0300
commit32cac597275706930b221b19fb20b29ccebc7130 (patch)
treeeff1772526935597f6539eec340d0c29f0049fc7 /spec/lib/gitlab/url_builder_spec.rb
parent8bd232d43bb2c0c8d5b5b4e92609adcfbda9a008 (diff)
Added more actions and report as abuse to all notes
Diffstat (limited to 'spec/lib/gitlab/url_builder_spec.rb')
-rw-r--r--spec/lib/gitlab/url_builder_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb
index 3fe8cf43934..e8a37e8d77b 100644
--- a/spec/lib/gitlab/url_builder_spec.rb
+++ b/spec/lib/gitlab/url_builder_spec.rb
@@ -97,6 +97,17 @@ describe Gitlab::UrlBuilder, lib: true do
end
end
+ context 'on a PersonalSnippet' do
+ it 'returns a proper URL' do
+ personal_snippet = create(:personal_snippet)
+ note = build_stubbed(:note_on_personal_snippet, noteable: personal_snippet)
+
+ url = described_class.build(note)
+
+ expect(url).to eq "#{Settings.gitlab['url']}/snippets/#{note.noteable_id}#note_#{note.id}"
+ end
+ end
+
context 'on another object' do
it 'returns a proper URL' do
project = build_stubbed(:empty_project)