Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-02-27 16:08:48 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-03-01 14:47:52 +0300
commitc5b3b71e89996ba4e6fb977e3cbb3eebfbbfed4e (patch)
treef00ba49189df8a72f647c33c4670534f70c7cc64 /spec/services
parent31353188f84bd3e57318b4b1aa2da93a9d9605d1 (diff)
CE-port for 7714-view-recent-boards
Adds additional count param to Boards::Visits::LatestService
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/boards/visits/latest_service_spec.rb12
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