diff options
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 |