Sha256: 4285a2e12a879bcb20c1780c5b9ebc7e4f197e98e8e866befeb838b8b37bb661
Contents?: true
Size: 838 Bytes
Versions: 5
Compression:
Stored size: 838 Bytes
Contents
require 'spec_helper' RSpec.describe Slack::Events::Config do before do ENV['SLACK_SIGNING_SECRET'] = 'secret' Slack::Events::Config.reset end it 'defaults signing secret to ENV[SLACK_SIGNING_SECRET]' do expect(Slack::Events.config.signing_secret).to eq 'secret' end it 'defaults signature expiration to 5 minutes' do expect(Slack::Events.config.signature_expires_in).to eq 5 * 60 end context 'configured' do before do Slack::Events.configure do |config| config.signing_secret = 'custom' config.signature_expires_in = 45 end end it 'uses the configured values' do expect(Slack::Events.config.signing_secret).to eq 'custom' expect(Slack::Events.config.signature_expires_in).to eq 45 end end after do ENV.delete 'SLACK_SIGNING_SECRET' end end
Version data entries
5 entries across 5 versions & 1 rubygems