diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/helpers/import_helper_spec.rb | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/helpers/import_helper_spec.rb')
-rw-r--r-- | spec/helpers/import_helper_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/helpers/import_helper_spec.rb b/spec/helpers/import_helper_spec.rb index 18cbbdfd804..7a5a69ea5b5 100644 --- a/spec/helpers/import_helper_spec.rb +++ b/spec/helpers/import_helper_spec.rb @@ -49,4 +49,20 @@ RSpec.describe ImportHelper do expect(helper.provider_project_link_url(host_url, full_path)).to match('http://provider.com/repo/path') end end + + describe '#import_configure_github_admin_message' do + subject { helper.import_configure_github_admin_message } + + it 'returns note for admin' do + allow(helper).to receive(:current_user) { instance_double('User', can_admin_all_resources?: true) } + + is_expected.to have_text('Note: As an administrator') + end + + it 'returns note for other user' do + allow(helper).to receive(:current_user) { instance_double('User', can_admin_all_resources?: false) } + + is_expected.to have_text('Note: Consider asking your GitLab administrator') + end + end end |