Skip to content
代码片段 群组 项目
提交 540877d0 编辑于 作者: Alex Kalderimis's avatar Alex Kalderimis
浏览文件

Use dig rather than nested access

上级 1e290112
No related branches found
No related tags found
无相关合并请求
......@@ -241,7 +241,7 @@
end
end
subject { result['data']['item'].first }
subject { result.dig('data', 'item', 0) }
include_examples 'authorization with a single permission'
end
......@@ -286,7 +286,7 @@
end
it 'renders the issues the user has access to' do
issue_edges = result['data']['testProject']['testIssues']['edges']
issue_edges = result.dig('data', 'testProject', 'testIssues', 'edges')
issue_ids = issue_edges.map { |issue_edge| issue_edge['node']&.fetch('id') }
expect(issue_edges.size).to eq(visible_issues.size)
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册