diff options
Diffstat (limited to 'spec/requests/admin')
-rw-r--r-- | spec/requests/admin/broadcast_messages_controller_spec.rb | 18 | ||||
-rw-r--r-- | spec/requests/admin/integrations_controller_spec.rb | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/spec/requests/admin/broadcast_messages_controller_spec.rb b/spec/requests/admin/broadcast_messages_controller_spec.rb new file mode 100644 index 00000000000..9101370d42d --- /dev/null +++ b/spec/requests/admin/broadcast_messages_controller_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Admin::BroadcastMessagesController, :enable_admin_mode do + before do + sign_in(create(:admin)) + end + + describe 'POST /preview' do + it 'renders preview partial' do + post preview_admin_broadcast_messages_path, params: { broadcast_message: { message: "Hello, world!" } } + + expect(response).to have_gitlab_http_status(:ok) + expect(response.body).to render_template(:_preview) + end + end +end diff --git a/spec/requests/admin/integrations_controller_spec.rb b/spec/requests/admin/integrations_controller_spec.rb index cfb40063095..128aada0975 100644 --- a/spec/requests/admin/integrations_controller_spec.rb +++ b/spec/requests/admin/integrations_controller_spec.rb @@ -38,6 +38,7 @@ RSpec.describe Admin::IntegrationsController, :enable_admin_mode do expect(response).to include_pagination_headers expect(json_response).to contain_exactly( { + 'id' => project.id, 'avatar_url' => project.avatar_url, 'full_name' => project.full_name, 'name' => project.name, |