diff options
Diffstat (limited to 'spec/services/boards/visits/latest_service_spec.rb')
-rw-r--r-- | spec/services/boards/visits/latest_service_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/boards/visits/latest_service_spec.rb b/spec/services/boards/visits/latest_service_spec.rb index e55d599e2cc..c8a0a5e4243 100644 --- a/spec/services/boards/visits/latest_service_spec.rb +++ b/spec/services/boards/visits/latest_service_spec.rb @@ -23,6 +23,12 @@ describe Boards::Visits::LatestService do service.execute end + + it 'queries for last N visits' do + expect(BoardProjectRecentVisit).to receive(:latest).with(user, project, count: 5).once + + described_class.new(project_board.parent, user, count: 5).execute + end end context 'when a group board' do @@ -42,6 +48,12 @@ describe Boards::Visits::LatestService do service.execute end + + it 'queries for last N visits' do + expect(BoardGroupRecentVisit).to receive(:latest).with(user, group, count: 5).once + + described_class.new(group_board.parent, user, count: 5).execute + end end end end |