pull/402/merge
Pete Matsyburka 1 month ago
parent 61c5ee22a0
commit bdd33c7d6b

@ -16,6 +16,10 @@ RSpec.describe SendFormCompletedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -16,6 +16,10 @@ RSpec.describe SendFormDeclinedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -16,6 +16,10 @@ RSpec.describe SendFormStartedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -16,6 +16,10 @@ RSpec.describe SendFormViewedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -13,6 +13,10 @@ RSpec.describe SendSubmissionCompletedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -13,6 +13,10 @@ RSpec.describe SendSubmissionCreatedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -13,6 +13,10 @@ RSpec.describe SendSubmissionExpiredWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -12,6 +12,10 @@ RSpec.describe SendTemplateCreatedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -12,6 +12,10 @@ RSpec.describe SendTemplateUpdatedWebhookRequestJob do
end end
describe '#perform' do describe '#perform' do
around do |example|
freeze_time { example.run }
end
before do before do
stub_request(:post, webhook_url.url).to_return(status: 200) stub_request(:post, webhook_url.url).to_return(status: 200)
end end

@ -54,6 +54,7 @@ RSpec.configure do |config|
config.include FactoryBot::Syntax::Methods config.include FactoryBot::Syntax::Methods
config.include Devise::Test::IntegrationHelpers config.include Devise::Test::IntegrationHelpers
config.include SigningFormHelper config.include SigningFormHelper
config.include ActiveSupport::Testing::TimeHelpers
config.before(:each, type: :system) do config.before(:each, type: :system) do
if ENV['HEADLESS'] == 'false' if ENV['HEADLESS'] == 'false'

@ -61,7 +61,6 @@ RSpec.describe 'Email Settings' do
expect(page).to have_field('Host', with: encrypted_config.value['host']) expect(page).to have_field('Host', with: encrypted_config.value['host'])
expect(page).to have_field('Port', with: encrypted_config.value['port']) expect(page).to have_field('Port', with: encrypted_config.value['port'])
expect(page).to have_field('Username', with: encrypted_config.value['username']) expect(page).to have_field('Username', with: encrypted_config.value['username'])
expect(page).to have_field('Password', with: encrypted_config.value['password'])
expect(page).to have_field('Domain', with: encrypted_config.value['domain']) expect(page).to have_field('Domain', with: encrypted_config.value['domain'])
expect(page).to have_select('Authentication', selected: 'Plain') expect(page).to have_select('Authentication', selected: 'Plain')
expect(page).to have_field('Send from Email', with: encrypted_config.value['from_email']) expect(page).to have_field('Send from Email', with: encrypted_config.value['from_email'])

Loading…
Cancel
Save