mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 22:52:32 -05:00
add base feature specs
This commit is contained in:
1 parent
6b4e7c2264
commit
cbc6f4497a
32 files changed
+1134
-12
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe 'Webhook Settings' do
|
||||
let!(:account) { create(:account) }
|
||||
let!(:user) { create(:user, account:) }
|
||||
|
||||
before do
|
||||
sign_in(user)
|
||||
visit settings_webhooks_path
|
||||
end
|
||||
|
||||
it 'shows webhook settings page' do
|
||||
expect(page).to have_content('Webhooks')
|
||||
expect(page).to have_field('Webhook URL')
|
||||
expect(page).to have_button('Save')
|
||||
end
|
||||
|
||||
it 'updates the webhook URL' do
|
||||
fill_in 'Webhook URL', with: 'https://example.com'
|
||||
|
||||
expect do
|
||||
click_button 'Save'
|
||||
end.to change(EncryptedConfig, :count).by(1)
|
||||
|
||||
encrypted_config = EncryptedConfig.find_by(account:, key: EncryptedConfig::WEBHOOK_URL_KEY)
|
||||
|
||||
expect(encrypted_config.value).to eq('https://example.com')
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user