diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-01-23 23:40:25 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-02-09 22:40:37 +0300 |
commit | 0b14b654b6e5d936f7241dcc0c249e0d4cc42728 (patch) | |
tree | 714fff562236a7cbc78d837cea8ff7a648923166 /spec/controllers/dashboard_controller_spec.rb | |
parent | c4fd6ff407cff8f2f742997a7400ba940a1fce5f (diff) |
Gather issuable metadata to avoid n+ queries on index view
Diffstat (limited to 'spec/controllers/dashboard_controller_spec.rb')
-rw-r--r-- | spec/controllers/dashboard_controller_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/dashboard_controller_spec.rb b/spec/controllers/dashboard_controller_spec.rb new file mode 100644 index 00000000000..566d8515198 --- /dev/null +++ b/spec/controllers/dashboard_controller_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe DashboardController do + let(:user) { create(:user) } + let(:project) { create(:project) } + + before do + project.team << [user, :master] + sign_in(user) + end + + describe 'GET issues' do + it_behaves_like 'issuables list meta-data', :issue, :issues + end + + describe 'GET merge requests' do + it_behaves_like 'issuables list meta-data', :merge_request, :merge_requests + end +end |