mirror of
https://github.com/meineerde/rackstash.git
synced 2026-02-11 13:05:19 +00:00
Test that Adapter::File.from_uri only accepts file URIs
This commit is contained in:
parent
6d4106fcb7
commit
18abd892ba
@ -41,6 +41,14 @@ describe Rackstash::Adapter::File do
|
|||||||
expect(described_class.from_uri('file:/tmp/file_spec.log?auto_reopen=false').auto_reopen?)
|
expect(described_class.from_uri('file:/tmp/file_spec.log?auto_reopen=false').auto_reopen?)
|
||||||
.to eql false
|
.to eql false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'only accepts file URIs' do
|
||||||
|
expect { described_class.from_uri('http://example.com') }
|
||||||
|
.to raise_error ArgumentError, 'Invalid URI: http://example.com'
|
||||||
|
|
||||||
|
expect { described_class.from_uri('') }
|
||||||
|
.to raise_error ArgumentError, 'Invalid URI: '
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#initialize' do
|
describe '#initialize' do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user