diff options
Diffstat (limited to 'spec/requests/admin/broadcast_messages_controller_spec.rb')
-rw-r--r-- | spec/requests/admin/broadcast_messages_controller_spec.rb | 18 |
1 files changed, 18 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 |