diff options
author | James Lopez <james@jameslopez.es> | 2016-11-23 13:04:06 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-01-17 11:32:55 +0100 |
commit | e4e313fccab6816fb2e52ebdf83807fba4a52051 (patch) | |
tree | 14608c8b47cbc6e136e4a5d3ea160c26b284a892 /spec/models/cycle_analytics | |
parent | a67311cb4c9f54af43d300fde5240f9a370193d1 (diff) | |
download | gitlab-ce-e4e313fccab6816fb2e52ebdf83807fba4a52051.tar.gz |
Fix other spec failures
Diffstat (limited to 'spec/models/cycle_analytics')
-rw-r--r-- | spec/models/cycle_analytics/summary_spec.rb | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/spec/models/cycle_analytics/summary_spec.rb b/spec/models/cycle_analytics/summary_spec.rb deleted file mode 100644 index a8c1c4b9c5e..00000000000 --- a/spec/models/cycle_analytics/summary_spec.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'spec_helper' - -describe Gitlab::CycleAnalytics::StageSummary, models: true do - let(:project) { create(:project) } - let(:from) { Time.now } - let(:user) { create(:user, :admin) } - subject { CycleAnalyticsTest.new(project, options: { from: from_date }) } - - describe "#new_issues" do - it "finds the number of issues created after the 'from date'" do - Timecop.freeze(5.days.ago) { create(:issue, project: project) } - Timecop.freeze(5.days.from_now) { create(:issue, project: project) } - - expect(subject.new_issues).to eq(1) - end - - it "doesn't find issues from other projects" do - Timecop.freeze(5.days.from_now) { create(:issue, project: create(:project)) } - - expect(subject.new_issues).to eq(0) - end - end - - describe "#commits" do - it "finds the number of commits created after the 'from date'" do - Timecop.freeze(5.days.ago) { create_commit("Test message", project, user, 'master') } - Timecop.freeze(5.days.from_now) { create_commit("Test message", project, user, 'master') } - - expect(subject.commits).to eq(1) - end - - it "doesn't find commits from other projects" do - Timecop.freeze(5.days.from_now) { create_commit("Test message", create(:project), user, 'master') } - - expect(subject.commits).to eq(0) - end - - it "finds a large (> 100) snumber of commits if present" do - Timecop.freeze(5.days.from_now) { create_commit("Test message", project, user, 'master', count: 100) } - - expect(subject.commits).to eq(100) - end - end - - describe "#deploys" do - it "finds the number of deploys made created after the 'from date'" do - Timecop.freeze(5.days.ago) { create(:deployment, project: project) } - Timecop.freeze(5.days.from_now) { create(:deployment, project: project) } - - expect(subject.deploys).to eq(1) - end - - it "doesn't find commits from other projects" do - Timecop.freeze(5.days.from_now) { create(:deployment, project: create(:project)) } - - expect(subject.deploys).to eq(0) - end - end -end |