Skip to content

Commit

Permalink
added basic unit test for url input source
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianMindee committed Jun 16, 2023
1 parent d30b515 commit 987e914
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/input/sources_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,16 @@
expect(input.pdf?).to eq(true)
end
end

context 'A remote url file' do
it 'should not send an invalid URL' do
expect do
input = Mindee::Input::UrlInputSource.new('http://invalid-url')
end.to raise_error 'URL must be HTTPS'
end
it 'should send a valid URL' do
input = Mindee::Input::UrlInputSource.new('https://platform.mindee.com')
expect(input.url).to eq('https://platform.mindee.com')
end
end
end

0 comments on commit 987e914

Please sign in to comment.