Sha256: 6bdcf11f18c3c271c4445a111baa7357cb63c35cb59c5b7ab7d288f4a2ea90a4
Contents?: true
Size: 628 Bytes
Versions: 15
Compression:
Stored size: 628 Bytes
Contents
require 'spec_helper' describe LinkThumbnailer::ImageValidator do let(:src) { 'http://foo.com' } let(:image) { double(src: src) } let(:instance) { described_class.new(image) } describe '#call' do let(:action) { instance.call } before do instance.stub(:blacklist_urls).and_return(blacklist_urls) end context 'when image url is blacklisted' do let(:blacklist_urls) { [src] } it { expect(action).to be_falsey } end context 'when image url is not blacklisted' do let(:blacklist_urls) { [] } it { expect(action).to be_truthy } end end end
Version data entries
15 entries across 15 versions & 1 rubygems