diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-06 09:08:18 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-06 09:08:18 +0000 |
| commit | eb4b72630a9f479f33858fc9011e18666da3bbba (patch) | |
| tree | ce57895d1d9291b9e76dd28fe7c95d776bc54a10 /spec/controllers/admin | |
| parent | c5d8b7e6909eb0478c4b2165689004051cdc7ac5 (diff) | |
| download | gitlab-ce-eb4b72630a9f479f33858fc9011e18666da3bbba.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/admin')
| -rw-r--r-- | spec/controllers/admin/applications_controller_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/controllers/admin/applications_controller_spec.rb b/spec/controllers/admin/applications_controller_spec.rb index edb17aefe86..1feda0ed36f 100644 --- a/spec/controllers/admin/applications_controller_spec.rb +++ b/spec/controllers/admin/applications_controller_spec.rb @@ -50,6 +50,12 @@ RSpec.describe Admin::ApplicationsController do it { is_expected.to have_gitlab_http_status(:ok) } it { expect { subject }.to change { application.reload.secret } } + it 'returns the secret in json format' do + subject + + expect(json_response['secret']).not_to be_nil + end + context 'when renew fails' do before do allow_next_found_instance_of(Doorkeeper::Application) do |application| @@ -58,7 +64,7 @@ RSpec.describe Admin::ApplicationsController do end it { expect { subject }.not_to change { application.reload.secret } } - it { is_expected.to redirect_to(admin_application_url(application)) } + it { is_expected.to have_gitlab_http_status(:unprocessable_entity) } end end |
