diff options
author | Jonathan Schoeffling <jonathan.schoeffling@lmco.com> | 2015-06-14 18:04:20 -0400 |
---|---|---|
committer | Michael Chmielewski <code@mikec.123mail.org> | 2015-10-28 22:34:39 -0400 |
commit | 5a5069969ce8e9184e36abbb7623bf474d5869e9 (patch) | |
tree | ad20f6d4f79b67a26a6237e95e37b1af42517970 /spec | |
parent | 8c9e1df98eb45e3305ab5badc6727580e84d36e0 (diff) | |
download | gitlab-ce-5a5069969ce8e9184e36abbb7623bf474d5869e9.tar.gz |
Add support for searching commit log messages
Include the log messages of recent commits in project-level search
results, providing functionality similar to 'git log --grep'.
Update repository model rspec tests to validate the output of
Repository#commits_with_log_matching.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/repository_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 05e51532eb8..ceffd5a8617 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -26,6 +26,17 @@ describe Repository do it { is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8') } end + describe :commits_with_log_matching do + subject { repository.commits_with_log_matching('submodule'). + map{|k| k.id} + } + + it { is_expected.to include('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } + it { is_expected.to include('6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9') } + it { is_expected.to include('cfe32cf61b73a0d5e9f13e774abde7ff789b1660') } + it { is_expected.not_to include('913c66a37b4a45b9769037c55c2d238bd0942d2e') } + end + describe :blob_at do context 'blank sha' do subject { repository.blob_at(Gitlab::Git::BLANK_SHA, '.gitignore') } |