diff options
author | DJ Mountney <david@twkie.net> | 2017-06-08 09:56:39 -0700 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-06-08 09:56:39 -0700 |
commit | ae6adf165ce7d9a85d7b8886eefdbe96aac2816b (patch) | |
tree | 60ad286a01988df93196cea2c644a858a98999c0 /spec/policies | |
parent | e1d1a5240c98a427f2ef10f2a7cbee0c9a883834 (diff) | |
download | gitlab-ce-ae6adf165ce7d9a85d7b8886eefdbe96aac2816b.tar.gz |
Merge branch '25934-project-snippet-vis' into 'security-9-2'
Fix visibility when referencing snippets
See merge request !2101
Diffstat (limited to 'spec/policies')
-rw-r--r-- | spec/policies/project_snippet_policy_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/policies/project_snippet_policy_spec.rb b/spec/policies/project_snippet_policy_spec.rb index e1771b636b8..ddbed5f781e 100644 --- a/spec/policies/project_snippet_policy_spec.rb +++ b/spec/policies/project_snippet_policy_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' describe ProjectSnippetPolicy, models: true do let(:regular_user) { create(:user) } let(:external_user) { create(:user, :external) } - let(:project) { create(:empty_project) } + let(:project) { create(:empty_project, :public) } let(:author_permissions) do [ @@ -107,7 +107,7 @@ describe ProjectSnippetPolicy, models: true do end context 'snippet author' do - let(:snippet) { create(:project_snippet, :private, author: regular_user) } + let(:snippet) { create(:project_snippet, :private, author: regular_user, project: project) } subject { described_class.abilities(regular_user, snippet).to_set } |