diff options
Diffstat (limited to 'spec/lib/gitlab/graphs/commits_spec.rb')
-rw-r--r-- | spec/lib/gitlab/graphs/commits_spec.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/lib/gitlab/graphs/commits_spec.rb b/spec/lib/gitlab/graphs/commits_spec.rb index 530d4a981bf..09654e0439e 100644 --- a/spec/lib/gitlab/graphs/commits_spec.rb +++ b/spec/lib/gitlab/graphs/commits_spec.rb @@ -11,12 +11,14 @@ describe Gitlab::Graphs::Commits do describe '#commit_per_day' do context 'when range is only commits from today' do subject { described_class.new([commit2, commit1]).commit_per_day } + it { is_expected.to eq 2 } end end context 'when range is only commits from today' do subject { described_class.new([commit2, commit1]) } + describe '#commit_per_day' do it { expect(subject.commit_per_day).to eq 2 } end @@ -28,6 +30,7 @@ describe Gitlab::Graphs::Commits do context 'with commits from yesterday and today' do subject { described_class.new([commit2, commit1_yesterday]) } + describe '#commit_per_day' do it { expect(subject.commit_per_day).to eq 1.0 } end |