diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 06:07:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 06:07:59 +0000 |
commit | 7421e6f9f2b5889b05738af7eba568af6ae3fcbc (patch) | |
tree | 0c7f9656565ae4ef09611345248ea518c4deb5b8 /spec/controllers | |
parent | bf32dbaad2b059a3bf3e880c08cb0a026effc158 (diff) | |
download | gitlab-ce-7421e6f9f2b5889b05738af7eba568af6ae3fcbc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/boards/issues_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb index 41c37cb84e5..c57ad937712 100644 --- a/spec/controllers/boards/issues_controller_spec.rb +++ b/spec/controllers/boards/issues_controller_spec.rb @@ -112,6 +112,13 @@ describe Boards::IssuesController do expect { list_issues(user: user, board: group_board, list: list3) }.not_to exceed_query_limit(control_count + (2 * 8 - 1)) end + + it 'does not query issues table more than once' do + recorder = ActiveRecord::QueryRecorder.new { list_issues(user: user, board: board, list: list1) } + query_count = recorder.occurrences.select { |query,| query.start_with?('SELECT issues.*') }.each_value.first + + expect(query_count).to eq(1) + end end context 'with invalid list id' do |