diff options
Diffstat (limited to 'spec/finders/branches_finder_spec.rb')
-rw-r--r-- | spec/finders/branches_finder_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/finders/branches_finder_spec.rb b/spec/finders/branches_finder_spec.rb index 6ea9a3a3ec5..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('video') + 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 |