spec/dragonfly/job/fetch_url_spec.rb in dragonfly-1.0.12 vs spec/dragonfly/job/fetch_url_spec.rb in dragonfly-1.1.0

- old
+ new

@@ -28,9 +28,15 @@ stub_request(:get, 'https://place.com').to_return(:body => 'secure result!') job.fetch_url!('https://place.com') job.data.should == "secure result!" end + it 'should also work with basic auth' do + stub_request(:get, 'http://example.com').with(basic_auth: ['user', 'pass']).to_return(:body => 'basic auth') + job.fetch_url!('http://user:pass@example.com') + job.data.should == 'basic auth' + end + [ "place.com", "http://place.com", "place.com/", "place.com/stuff/",