-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tracks attr_reader to Configuration
Properly require spec_helper
- Loading branch information
1 parent
0fbc9a1
commit b54a6db
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "../spec_helper" | ||
|
||
describe Rack::Attack::Configuration do | ||
let(:config) { Rack::Attack::Configuration.new } | ||
|
||
describe 'attributes' do | ||
it 'exposes the safelists attribute' do | ||
expect(config.safelists).to eq({}) | ||
end | ||
|
||
it 'exposes the blocklists attribute' do | ||
expect(config.blocklists).to eq({}) | ||
end | ||
|
||
it 'exposes the throttles attribute' do | ||
expect(config.throttles).to eq({}) | ||
end | ||
|
||
it 'exposes the tracks attribute' do | ||
expect(config.tracks).to eq({}) | ||
end | ||
|
||
it 'exposes the anonymous_blocklists attribute' do | ||
expect(config.anonymous_blocklists).to eq([]) | ||
end | ||
|
||
it 'exposes the anonymous_safelists attribute' do | ||
expect(config.anonymous_safelists).to eq([]) | ||
end | ||
end | ||
end |