diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/requests/product_analytics | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/requests/product_analytics')
-rw-r--r-- | spec/requests/product_analytics/collector_app_spec.rb | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/spec/requests/product_analytics/collector_app_spec.rb b/spec/requests/product_analytics/collector_app_spec.rb index 0491c2564f0..b87610841e7 100644 --- a/spec/requests/product_analytics/collector_app_spec.rb +++ b/spec/requests/product_analytics/collector_app_spec.rb @@ -5,6 +5,7 @@ require 'spec_helper' RSpec.describe 'ProductAnalytics::CollectorApp' do let_it_be(:project) { create(:project) } let(:params) { {} } + let(:raw_event) { Gitlab::Json.parse(fixture_file('product_analytics/event.json')) } subject { get '/-/collector/i', params: params } @@ -17,24 +18,7 @@ RSpec.describe 'ProductAnalytics::CollectorApp' do end context 'correct event params' do - let(:params) do - { - aid: project.id, - p: 'web', - tna: 'sp', - tv: 'js-2.14.0', - eid: SecureRandom.uuid, - duid: SecureRandom.uuid, - sid: SecureRandom.uuid, - vid: 4, - url: 'http://example.com/products/1', - refr: 'http://example.com/products/1', - lang: 'en-US', - cookie: true, - tz: 'America/Los_Angeles', - cs: 'UTF-8' - } - end + let(:params) { raw_event.merge(aid: project.id) } it 'repond with 200' do expect { subject }.to change { ProductAnalyticsEvent.count }.by(1) |