diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-20 09:06:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-20 09:06:17 +0000 |
commit | 8ac91ecfd1bb445a0a1572b3c0885c41c9037e8a (patch) | |
tree | 4b8c9d2a99ad50ef84421b57758869863ea477a2 /spec/presenters | |
parent | 7e20809103e1f9c0c96c3a96705224c81bf448d5 (diff) | |
download | gitlab-ce-8ac91ecfd1bb445a0a1572b3c0885c41c9037e8a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/project_presenter_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/presenters/project_presenter_spec.rb b/spec/presenters/project_presenter_spec.rb index 5bf80f6e318..2a00548c2c3 100644 --- a/spec/presenters/project_presenter_spec.rb +++ b/spec/presenters/project_presenter_spec.rb @@ -430,4 +430,26 @@ describe ProjectPresenter do ) end end + + describe '#empty_repo_statistics_buttons' do + let(:project) { create(:project, :repository) } + let(:presenter) { described_class.new(project, current_user: user) } + + subject(:empty_repo_statistics_buttons) { presenter.empty_repo_statistics_buttons } + + before do + project.add_developer(user) + allow(project).to receive(:auto_devops_enabled?).and_return(false) + end + + it 'orders the items correctly in an empty project' do + expect(empty_repo_statistics_buttons.map(&:label)).to start_with( + a_string_including('New'), + a_string_including('README'), + a_string_including('CHANGELOG'), + a_string_including('CONTRIBUTING'), + a_string_including('CI/CD') + ) + end + end end |