Commit f80f6bbc authored by Lin Jen-Shin's avatar Lin Jen-Shin

Use a block and move setup to example directly

parent 50491d32
...@@ -19,7 +19,7 @@ module Resolvers ...@@ -19,7 +19,7 @@ module Resolvers
args[:iids] ||= [args[:iid]].compact 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 .select(&:itself) # .compact doesn't work on BatchLoader
end end
......
...@@ -75,11 +75,9 @@ describe 'getting an issue list for a project' do ...@@ -75,11 +75,9 @@ describe 'getting an issue list for a project' do
end end
context 'when the user can see confidential issues' do context 'when the user can see confidential issues' do
before do it 'returns issues with confidential issues' do
project.add_developer(current_user) project.add_developer(current_user)
end
it 'returns issues with confidential issues' do
post_graphql(query, current_user: current_user) post_graphql(query, current_user: current_user)
expect(issues_data.size).to eq(3) expect(issues_data.size).to eq(3)
......
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