mirror of
https://github.com/danbee/danbarberphoto
synced 2025-03-04 08:49:07 +00:00
WIP: Attempt to stub image request
This commit is contained in:
parent
1b326fd0a0
commit
8909d25e3e
@ -10,7 +10,9 @@ feature 'visitor navigates site' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'increments the view counter when an image is displayed', js: true do
|
it 'increments the view counter when an image is displayed', js: true do
|
||||||
stub_request(:get, 'http://res.cloudinary.com/danbarber/image/upload/photo.jpg')
|
image = File.read(File.join(fixture_path, 'photo.jpg'))
|
||||||
|
stub_request(:get, 'http://res.cloudinary.com/test/image/upload/photo.jpg')
|
||||||
|
.to_return(body: image, headers: { 'Content-Type' => 'image/jpeg' })
|
||||||
|
|
||||||
category = create(:category)
|
category = create(:category)
|
||||||
photo = create(:photo, image_cloudinary_id: 'photo', featured: true, categories: [category])
|
photo = create(:photo, image_cloudinary_id: 'photo', featured: true, categories: [category])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user