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:
authorJames Lopez <james@jameslopez.es>2016-10-13 18:11:28 +0300
committerJames Lopez <james@jameslopez.es>2016-11-17 10:22:54 +0300
commitec7db295d230ba1cec0c75ae199d60bd8f89c1d6 (patch)
tree62b1412698ba2a7ed2e5fb3d3c687fc9cdf0d0ca /spec/lib/gitlab/cycle_analytics
parent60306053a2a14ff881bb56eadd4968bc4d4f48dc (diff)
Started refactoring stuff to add events to cycle analytics
- Refactored cycle analytics class to extract DB logic - Reuse logic in new events fetcher - Started adding cycle analytics events class and spec (still not functional)
Diffstat (limited to 'spec/lib/gitlab/cycle_analytics')
-rw-r--r--spec/lib/gitlab/cycle_analytics/events_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/lib/gitlab/cycle_analytics/events_spec.rb b/spec/lib/gitlab/cycle_analytics/events_spec.rb
new file mode 100644
index 00000000000..b68cc16f4e6
--- /dev/null
+++ b/spec/lib/gitlab/cycle_analytics/events_spec.rb
@@ -0,0 +1,26 @@
+require 'spec_helper'
+
+describe Gitlab::CycleAnalytics::Events do
+ let(:project) { create(:project) }
+ let(:from_date) { 10.days.ago }
+ let(:user) { create(:user, :admin) }
+
+ subject { described_class.new(project: project, from: from_date) }
+
+ before do
+ setup(context)
+ end
+
+ describe '#issue' do
+ let!(:context) { create(:issue, project: project) }
+
+ xit 'does something' do
+ expect(subject.issue_events).to eq([])
+ end
+ end
+
+ def setup(context)
+ create(:milestone, project: project)
+ create_merge_request_closing_issue(context)
+ end
+end