diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 16:05:49 +0000 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /spec/views/projects/edit.html.haml_spec.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) | |
download | gitlab-ce-0f94cf6ca9d272d8e0fda4a7a597866cf3dc1fc0.tar.gz |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc4216-0-stable
Diffstat (limited to 'spec/views/projects/edit.html.haml_spec.rb')
-rw-r--r-- | spec/views/projects/edit.html.haml_spec.rb | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb index bf154b61609..77336aa7d86 100644 --- a/spec/views/projects/edit.html.haml_spec.rb +++ b/spec/views/projects/edit.html.haml_spec.rb @@ -13,9 +13,11 @@ RSpec.describe 'projects/edit' do assign(:project, project) allow(controller).to receive(:current_user).and_return(user) - allow(view).to receive_messages(current_user: user, - can?: true, - current_application_settings: Gitlab::CurrentSettings.current_application_settings) + allow(view).to receive_messages( + current_user: user, + can?: true, + current_application_settings: Gitlab::CurrentSettings.current_application_settings + ) end context 'project export disabled' do @@ -101,4 +103,28 @@ RSpec.describe 'projects/edit' do it_behaves_like 'renders registration features prompt', :project_disabled_repository_size_limit end end + + describe 'pages menu entry callout' do + context 'with feature flag disabled' do + before do + stub_feature_flags(show_pages_in_deployments_menu: false) + end + + it 'does not show a callout' do + render + expect(rendered).not_to have_content('GitLab Pages has moved') + end + end + + context 'with feature flag enabled' do + before do + stub_feature_flags(show_pages_in_deployments_menu: true) + end + + it 'does show a callout' do + render + expect(rendered).to have_content('GitLab Pages has moved') + end + end + end end |