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:
authorHannes Rosenögger <123haynes@gmail.com>2015-03-13 13:39:26 +0300
committerHannes Rosenögger <123haynes@gmail.com>2015-03-18 10:42:42 +0300
commit9e5738b0072f8715d52801f3469be9f3742beb97 (patch)
treee6f83c4c42e05309ef20150796aefe372026e68f /spec/models/repository_spec.rb
parentdbd347bfa00e133da8ac178612ed8c30ef871ca4 (diff)
Extend the commit calendar to show the actual commits for a date
Diffstat (limited to 'spec/models/repository_spec.rb')
-rw-r--r--spec/models/repository_spec.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index b3a38f6c5b9..0e3e0b167d7 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -29,7 +29,7 @@ describe Repository do
subject { repository.timestamps_by_user_log(user) }
- it { is_expected.to eq(["2014-08-06", "2014-07-31", "2014-07-31"]) }
+ it { is_expected.to eq(['2014-08-06', '2014-07-31', '2014-07-31']) }
end
describe 'multiple emails for user' do
@@ -38,7 +38,22 @@ describe Repository do
subject { repository.timestamps_by_user_log(user) }
- it { is_expected.to eq(["2015-01-10", "2014-08-06", "2014-07-31", "2014-07-31"]) }
+ it { is_expected.to eq(['2015-01-10', '2014-08-06', '2014-07-31', '2014-07-31']) }
+ end
+ end
+
+ context :commits_by_user_on_date_log do
+
+ describe 'single e-mail for user' do
+ let(:user) { create(:user, email: sample_commit.author_email) }
+ let(:commit1) { '0ed8c6c6752e8c6ea63e7b92a517bf5ac1209c80' }
+ let(:commit2) { '7d3b0f7cff5f37573aea97cebfd5692ea1689924' }
+
+ subject { repository.commits_by_user_on_date_log(user,Date.new(2014, 07, 31)) }
+
+ it 'contains the exepected commits' do
+ expect(subject.flatten.map(&:id)).to eq([commit1, commit2])
+ end
end
end
end