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:
authorRobert Speicher <robert@gitlab.com>2018-08-03 00:00:13 +0300
committerRobert Speicher <robert@gitlab.com>2018-08-03 00:00:13 +0300
commit7da6ac06449eaf6a5385c3f5c24c5217731aa213 (patch)
tree200c90b3f8715270e0699afe8b092f2688ee9c9a /spec/services
parentc60cb3935089eeb358b8e96e63d879d5b49a3dcf (diff)
parent1436423a490fe9f4c1ee1ccb8ecaa6240eed2906 (diff)
Merge branch 'sh-fix-failing-deploy-token-clones' into 'master'
Fix failing 500 errors when deploy tokens are used to clone Closes gitlab-ee#7080 See merge request gitlab-org/gitlab-ce!20993
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/users/activity_service_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/services/users/activity_service_spec.rb b/spec/services/users/activity_service_spec.rb
index f20849e6924..719b4adf212 100644
--- a/spec/services/users/activity_service_spec.rb
+++ b/spec/services/users/activity_service_spec.rb
@@ -28,6 +28,18 @@ describe Users::ActivityService do
end
end
+ context 'when a bad object is passed' do
+ let(:fake_object) { double(username: 'hello') }
+
+ it 'does not record activity' do
+ service = described_class.new(fake_object, 'pull')
+
+ expect(service).not_to receive(:record_activity)
+
+ service.execute
+ end
+ end
+
context 'when last activity is today' do
let(:last_activity_on) { Date.today }