diff options
author | James Lopez <james@jameslopez.es> | 2016-11-17 15:22:27 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-11-17 15:22:27 +0300 |
commit | ed39d61d746925e49d952bd8169499d3200ae68b (patch) | |
tree | 33128144980f4b62e96309e9ed4c23133422159b /spec | |
parent | f9de157e70234748cf4285fafda7b3ec13862f5c (diff) |
refactor events facade so it uses separate classes and refactor query stuff
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/code_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/code_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/issue_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/issue_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/plan_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/plan_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/production_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/production_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/review_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/review_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/shared_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/shared_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/staging_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/staging_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/cycle_analytics/test_event_spec.rb (renamed from spec/lib/gitlab/cycle_analytics/test_config_spec.rb) | 4 | ||||
-rw-r--r-- | spec/serializers/analytics_generic_entity_spec.rb | 2 |
9 files changed, 19 insertions, 15 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/code_config_spec.rb b/spec/lib/gitlab/cycle_analytics/code_event_spec.rb index 7b89fdd76aa..7b854d7fea1 100644 --- a/spec/lib/gitlab/cycle_analytics/code_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/code_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::CodeConfig do +describe Gitlab::CycleAnalytics::CodeEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/issue_config_spec.rb b/spec/lib/gitlab/cycle_analytics/issue_event_spec.rb index ff8cd1e8068..2d7e7b1e0a5 100644 --- a/spec/lib/gitlab/cycle_analytics/issue_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/issue_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::IssueConfig do +describe Gitlab::CycleAnalytics::IssueEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/plan_config_spec.rb b/spec/lib/gitlab/cycle_analytics/plan_event_spec.rb index 92698defa5d..3452c146584 100644 --- a/spec/lib/gitlab/cycle_analytics/plan_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/plan_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::PlanConfig do +describe Gitlab::CycleAnalytics::PlanEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/production_config_spec.rb b/spec/lib/gitlab/cycle_analytics/production_event_spec.rb index 92485777334..069c84efa09 100644 --- a/spec/lib/gitlab/cycle_analytics/production_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/production_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::ProductionConfig do +describe Gitlab::CycleAnalytics::ProductionEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/review_config_spec.rb b/spec/lib/gitlab/cycle_analytics/review_event_spec.rb index 59cb18ac16d..e9aca82ecc9 100644 --- a/spec/lib/gitlab/cycle_analytics/review_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/review_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::ReviewConfig do +describe Gitlab::CycleAnalytics::ReviewEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/shared_config_spec.rb b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb index 060a59151d8..b15af783dfb 100644 --- a/spec/lib/gitlab/cycle_analytics/shared_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb @@ -12,4 +12,8 @@ shared_examples 'default query config' do it 'has the projection attributes' do expect(described_class.projections).not_to be_nil end + + it 'implements the fetch method' do + expect(described_class.fetch).not_to raise_error + end end diff --git a/spec/lib/gitlab/cycle_analytics/staging_config_spec.rb b/spec/lib/gitlab/cycle_analytics/staging_event_spec.rb index f13885d7f48..9c1bec3edb1 100644 --- a/spec/lib/gitlab/cycle_analytics/staging_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/staging_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::StagingConfig do +describe Gitlab::CycleAnalytics::StagingEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/lib/gitlab/cycle_analytics/test_config_spec.rb b/spec/lib/gitlab/cycle_analytics/test_event_spec.rb index 59421b99513..7238b9a34b3 100644 --- a/spec/lib/gitlab/cycle_analytics/test_config_spec.rb +++ b/spec/lib/gitlab/cycle_analytics/test_event_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' -require 'lib/gitlab/cycle_analytics/shared_config_spec' +require 'lib/gitlab/cycle_analytics/shared_event_spec' -describe Gitlab::CycleAnalytics::TestConfig do +describe Gitlab::CycleAnalytics::TestEvent do it_behaves_like 'default query config' it 'has the default order' do diff --git a/spec/serializers/analytics_generic_entity_spec.rb b/spec/serializers/analytics_generic_entity_spec.rb index 3bb15cb9475..68086216ba9 100644 --- a/spec/serializers/analytics_generic_entity_spec.rb +++ b/spec/serializers/analytics_generic_entity_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe AnalyticsGenericEntity do +describe AnalyticsIssueEntity do let(:user) { create(:user) } let(:entity_hash) do { |