You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
488 B

  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Admin::Webhooks::SecretsController do
  4. render_views
  5. let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
  6. before do
  7. sign_in user, scope: :user
  8. end
  9. describe 'POST #rotate' do
  10. let(:webhook) { Fabricate(:webhook) }
  11. it 'returns http success' do
  12. post :rotate, params: { webhook_id: webhook.id }
  13. expect(response).to redirect_to(admin_webhook_path(webhook))
  14. end
  15. end
  16. end