diff options
author | 🙈 jacopo beschi 🙉 <intrip@gmail.com> | 2018-09-21 20:06:55 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-09-21 20:06:55 +0300 |
commit | c49c596d17f8d8b62e29f2fd1344ce08cb0a0b93 (patch) | |
tree | 3656bb26d05d473afd779511a2646f398e4f3123 /spec/features | |
parent | 8f191590447d8e8aa375f1c1104540db5473ce51 (diff) |
Allows to sort projects by most stars
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/dashboard/projects_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb index 4daacc61d85..975b7944741 100644 --- a/spec/features/dashboard/projects_spec.rb +++ b/spec/features/dashboard/projects_spec.rb @@ -103,6 +103,14 @@ describe 'Dashboard Projects' do expect(page).not_to have_content(project.name) expect(page).to have_content(project3.name) end + + it 'sorts projects by most stars when sorting by most stars' do + project_with_most_stars = create(:project, namespace: user.namespace, star_count: 10) + + visit dashboard_projects_path(sort: :stars_desc) + + expect(first('.project-row')).to have_content(project_with_most_stars.title) + end end context 'when on Starred projects tab' do |