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:
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/author_updater_spec.rb')
-rw-r--r--spec/lib/gitlab/cycle_analytics/author_updater_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/author_updater_spec.rb b/spec/lib/gitlab/cycle_analytics/author_updater_spec.rb
new file mode 100644
index 00000000000..f9e4d1714e6
--- /dev/null
+++ b/spec/lib/gitlab/cycle_analytics/author_updater_spec.rb
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe Gitlab::CycleAnalytics::AuthorUpdater do
+ let(:user) { create(:user) }
+ let(:events) { [{ 'author_id' => user.id }] }
+
+ it 'maps the correct user' do
+ described_class.update!(events)
+
+ expect(events.first['author']).to eq(user)
+ end
+end