Use a block and move setup to example directly
This commit is contained in:
parent
50491d3241
commit
f80f6bbcdc
|
@ -19,7 +19,7 @@ module Resolvers
|
|||
|
||||
args[:iids] ||= [args[:iid]].compact
|
||||
|
||||
args[:iids].map(&method(:batch_load))
|
||||
args[:iids].map { |iid| batch_load(iid) }
|
||||
.select(&:itself) # .compact doesn't work on BatchLoader
|
||||
end
|
||||
|
||||
|
|
|
@ -75,11 +75,9 @@ describe 'getting an issue list for a project' do
|
|||
end
|
||||
|
||||
context 'when the user can see confidential issues' do
|
||||
before do
|
||||
project.add_developer(current_user)
|
||||
end
|
||||
|
||||
it 'returns issues with confidential issues' do
|
||||
project.add_developer(current_user)
|
||||
|
||||
post_graphql(query, current_user: current_user)
|
||||
|
||||
expect(issues_data.size).to eq(3)
|
||||
|
|
Loading…
Reference in New Issue