diff options
author | Valery Sizov <valery@gitlab.com> | 2014-10-24 20:24:49 +0400 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2014-10-24 20:39:14 +0400 |
commit | 7f97a1277de78bcd86d68978e9ec29a2548fc144 (patch) | |
tree | 069c947e915f60dbc4148a4d972a5ee4aeb7e2e2 /spec | |
parent | 9712fbcdd366c173e2ec277a617a4e690f6a86e9 (diff) |
internal snippets: fix exposing of title
Diffstat (limited to 'spec')
-rw-r--r-- | spec/finders/snippets_finder_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/finders/snippets_finder_spec.rb b/spec/finders/snippets_finder_spec.rb index 5af76968183..c645cbc964c 100644 --- a/spec/finders/snippets_finder_spec.rb +++ b/spec/finders/snippets_finder_spec.rb @@ -64,6 +64,13 @@ describe SnippetsFinder do snippets = SnippetsFinder.new.execute(user, filter: :by_user, user: user) snippets.should include(@snippet1, @snippet2, @snippet3) end + + it "returns only public snippets if unauthenticated user" do + snippets = SnippetsFinder.new.execute(nil, filter: :by_user, user: user) + snippets.should include(@snippet3) + snippets.should_not include(@snippet2, @snippet1) + end + end context 'by_project filter' do |