diff options
Diffstat (limited to 'spec/controllers/dashboard/snippets_controller_spec.rb')
-rw-r--r-- | spec/controllers/dashboard/snippets_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/dashboard/snippets_controller_spec.rb b/spec/controllers/dashboard/snippets_controller_spec.rb index 2d839094d34..d5e3a348cd2 100644 --- a/spec/controllers/dashboard/snippets_controller_spec.rb +++ b/spec/controllers/dashboard/snippets_controller_spec.rb @@ -17,5 +17,14 @@ describe Dashboard::SnippetsController do create(:personal_snippet, :public, author: user) end end + + it 'fetches snippet counts via the snippet count service' do + service = double(:count_service, execute: {}) + expect(Snippets::CountService) + .to receive(:new).with(user, author: user) + .and_return(service) + + get :index + end end end |