summaryrefslogtreecommitdiff
path: root/spec/finders
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-07-31 04:09:19 +0200
committerwinniehell <git@winniehell.de>2016-08-02 03:32:28 +0200
commitae9f0ca818b203df3bf61e5598c4e7e63c4c2d70 (patch)
tree9262f7d225f5219af5160edd1fccbb881a69f2b9 /spec/finders
parentc009f620173df2bcce43670c61dfaaa845719ebe (diff)
downloadgitlab-ce-ae9f0ca818b203df3bf61e5598c4e7e63c4c2d70.tar.gz
Add failing test for #20462
Diffstat (limited to 'spec/finders')
-rw-r--r--spec/finders/branches_finder_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb
index 482caeee64a..6fce11de30f 100644
--- a/spec/finders/branches_finder_spec.rb
+++ b/spec/finders/branches_finder_spec.rb
@@ -20,7 +20,11 @@ describe BranchesFinder do
result = branches_finder.execute
- expect(result.first.name).to eq('crlf-diff')
+ recently_updated_branch = repository.branches.max do |a, b|
+ repository.commit(a.target).committed_date <=> repository.commit(b.target).committed_date
+ end
+
+ expect(result.first.name).to eq(recently_updated_branch.name)
end
it 'sorts by last_updated' do