diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-14 15:08:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-14 15:08:21 +0300 |
commit | 674e7e2c3d295704bdf504dd0caa2e5a2d9b5cd2 (patch) | |
tree | 7454890d4f7aa8644c9e89954a978466e4416815 /spec/controllers | |
parent | c7ad2610df033b370845995ac3bbe269a191d9bb (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/concerns/metrics_dashboard_spec.rb | 8 | ||||
-rw-r--r-- | spec/controllers/registrations_controller_spec.rb | 12 |
2 files changed, 4 insertions, 16 deletions
diff --git a/spec/controllers/concerns/metrics_dashboard_spec.rb b/spec/controllers/concerns/metrics_dashboard_spec.rb index f6705ba6acc..fd1f4fc1641 100644 --- a/spec/controllers/concerns/metrics_dashboard_spec.rb +++ b/spec/controllers/concerns/metrics_dashboard_spec.rb @@ -134,10 +134,10 @@ describe MetricsDashboard do it 'adds starred dashboard information and sorts the list' do all_dashboards = json_response['all_dashboards'].map { |dashboard| dashboard.slice('display_name', 'starred', 'user_starred_path') } expected_response = [ - { "display_name" => "Default", "starred" => false, 'user_starred_path' => nil }, - { "display_name" => "anomaly.yml", "starred" => false, 'user_starred_path' => nil }, - { "display_name" => "errors.yml", "starred" => true, 'user_starred_path' => nil }, - { "display_name" => "test.yml", "starred" => true, 'user_starred_path' => nil } + { "display_name" => "Default", "starred" => false, 'user_starred_path' => api_v4_projects_metrics_user_starred_dashboards_path(id: project.id, params: { dashboard_path: 'config/prometheus/common_metrics.yml' }) }, + { "display_name" => "anomaly.yml", "starred" => false, 'user_starred_path' => api_v4_projects_metrics_user_starred_dashboards_path(id: project.id, params: { dashboard_path: '.gitlab/dashboards/anomaly.yml' }) }, + { "display_name" => "errors.yml", "starred" => true, 'user_starred_path' => api_v4_projects_metrics_user_starred_dashboards_path(id: project.id, params: { dashboard_path: '.gitlab/dashboards/errors.yml' }) }, + { "display_name" => "test.yml", "starred" => true, 'user_starred_path' => api_v4_projects_metrics_user_starred_dashboards_path(id: project.id, params: { dashboard_path: '.gitlab/dashboards/test.yml' }) } ] expect(all_dashboards).to eql expected_response diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb index 41822a5a34c..01a9647a763 100644 --- a/spec/controllers/registrations_controller_spec.rb +++ b/spec/controllers/registrations_controller_spec.rb @@ -144,16 +144,6 @@ describe RegistrationsController do expect(flash[:notice]).to eq(I18n.t('devise.registrations.signed_up')) end - - it 'does not require reCAPTCHA if disabled by feature flag' do - stub_feature_flags(registrations_recaptcha: false) - - post(:create, params: user_params) - - expect(controller).not_to receive(:verify_recaptcha) - expect(flash[:alert]).to be_nil - expect(flash[:notice]).to eq(I18n.t('devise.registrations.signed_up')) - end end context 'when invisible captcha is enabled' do @@ -294,8 +284,6 @@ describe RegistrationsController do end it "logs a 'User Created' message" do - stub_feature_flags(registrations_recaptcha: false) - expect(Gitlab::AppLogger).to receive(:info).with(/\AUser Created: username=new_username email=new@user.com.+\z/).and_call_original post(:create, params: user_params) |