Commit 5982811e authored by Sean McGivern's avatar Sean McGivern

Fix issuable finder and helper conflicts

parent d75ddcf2
......@@ -21,13 +21,10 @@
class IssuableFinder
NONE = '0'.freeze
IRRELEVANT_PARAMS_FOR_CACHE_KEY = %i[utf8 sort page].freeze
<<<<<<< HEAD
SCALAR_PARAMS = %i(scope state group_id project_id milestone_title assignee_id search label_name sort assignee_username author_id author_username authorized_only due_date iids non_archived weight).freeze
ARRAY_PARAMS = { label_name: [], iids: [] }.freeze
VALID_PARAMS = (SCALAR_PARAMS + [ARRAY_PARAMS]).freeze
=======
>>>>>>> ce-com/master
attr_accessor :current_user, :params
......
......@@ -165,10 +165,6 @@ module IssuablesHelper
}
state_title = titles[state] || state.to_s.humanize
<<<<<<< HEAD
=======
>>>>>>> ce-com/master
count = issuables_count_for_state(issuable_type, state)
html = content_tag(:span, state_title)
......
......@@ -314,11 +314,8 @@ describe IssuesFinder do
describe '#with_confidentiality_access_check' do
let(:guest) { create(:user) }
set(:authorized_user) { create(:user) }
<<<<<<< HEAD
let(:admin_user) { create(:user, :admin) }
let(:auditor_user) { create(:user, :auditor) }
=======
>>>>>>> ce-com/master
set(:project) { create(:empty_project, namespace: authorized_user.namespace) }
set(:public_issue) { create(:issue, project: project) }
set(:confidential_issue) { create(:issue, project: project, confidential: true) }
......@@ -328,7 +325,6 @@ describe IssuesFinder do
context 'for an anonymous user' do
subject { described_class.new(nil, params).with_confidentiality_access_check }
<<<<<<< HEAD
it 'returns only public issues' do
expect(subject).to include(public_issue)
......@@ -377,40 +373,6 @@ describe IssuesFinder do
context 'for an admin' do
subject { described_class.new(admin_user, params).with_confidentiality_access_check }
=======
it 'returns only public issues' do
expect(subject).to include(public_issue)
expect(subject).not_to include(confidential_issue)
end
end
context 'for a user without project membership' do
subject { described_class.new(user, params).with_confidentiality_access_check }
it 'returns only public issues' do
expect(subject).to include(public_issue)
expect(subject).not_to include(confidential_issue)
end
end
context 'for a guest user' do
subject { described_class.new(guest, params).with_confidentiality_access_check }
before do
project.add_guest(guest)
end
it 'returns only public issues' do
expect(subject).to include(public_issue)
expect(subject).not_to include(confidential_issue)
end
end
context 'for a project member with access to view confidential issues' do
subject { described_class.new(authorized_user, params).with_confidentiality_access_check }
>>>>>>> ce-com/master
it 'returns all issues' do
expect(subject).to include(public_issue, confidential_issue)
end
......@@ -482,7 +444,6 @@ describe IssuesFinder do
subject
end
end
<<<<<<< HEAD
context 'for an auditor' do
subject { described_class.new(auditor_user, params).with_confidentiality_access_check }
......@@ -511,8 +472,6 @@ describe IssuesFinder do
subject
end
end
=======
>>>>>>> ce-com/master
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment