diff options
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics/author_updater_spec.rb')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/author_updater_spec.rb | 12 |
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 |