diff options
Diffstat (limited to 'spec/features/projects/branches_spec.rb')
-rw-r--r-- | spec/features/projects/branches_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/features/projects/branches_spec.rb b/spec/features/projects/branches_spec.rb index dcad7ee66a3..4bfe8852291 100644 --- a/spec/features/projects/branches_spec.rb +++ b/spec/features/projects/branches_spec.rb @@ -21,11 +21,11 @@ RSpec.describe 'Branches' do before do # Add 4 stale branches (1..4).reverse_each do |i| - travel_to((threshold + i).ago) { create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}") } + travel_to((threshold + i.hours).ago) { create_file(message: "a commit in stale-#{i}", branch_name: "stale-#{i}") } end # Add 6 active branches (1..6).each do |i| - travel_to((threshold - i).ago) { create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}") } + travel_to((threshold - i.hours).ago) { create_file(message: "a commit in active-#{i}", branch_name: "active-#{i}") } end end @@ -34,7 +34,7 @@ RSpec.describe 'Branches' do visit project_branches_path(project) expect(page).to have_content(sorted_branches(repository, count: 5, sort_by: :updated_desc, state: 'active')) - expect(page).to have_content(sorted_branches(repository, count: 4, sort_by: :updated_desc, state: 'stale')) + expect(page).to have_content(sorted_branches(repository, count: 4, sort_by: :updated_asc, state: 'stale')) expect(page).to have_link('Show more active branches', href: project_branches_filtered_path(project, state: 'active')) expect(page).not_to have_content('Show more stale branches') @@ -50,10 +50,10 @@ RSpec.describe 'Branches' do end describe 'Stale branches page' do - it 'shows 4 active branches sorted by last updated' do + it 'shows 4 stale branches sorted by last updated' do visit project_branches_filtered_path(project, state: 'stale') - expect(page).to have_content(sorted_branches(repository, count: 4, sort_by: :updated_desc, state: 'stale')) + expect(page).to have_content(sorted_branches(repository, count: 4, sort_by: :updated_asc, state: 'stale')) end end |