Add BraveSearch facade tests
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
defmodule BraveSearch.Fixtures do
|
||||
@moduledoc false
|
||||
|
||||
@fixtures_folder Path.join([File.cwd!(), "test/support/fixtures/brave_search"])
|
||||
|
||||
@search_images_response Path.join([@fixtures_folder, "search_images_response.json"])
|
||||
|> File.read!()
|
||||
|> JSON.decode!()
|
||||
|
||||
def search_images_response, do: @search_images_response
|
||||
end
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"type": "images",
|
||||
"results": [
|
||||
{
|
||||
"title": "The Raven That Refused To Sing - Cover",
|
||||
"source": "https://example.com/page/raven",
|
||||
"thumbnail": {
|
||||
"src": "https://thumbnails.example.com/raven-thumb.jpg"
|
||||
},
|
||||
"properties": {
|
||||
"url": "https://images.example.com/raven-cover.jpg",
|
||||
"width": 1200,
|
||||
"height": 1200
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "Hand. Cannot. Erase. - Alternate Cover",
|
||||
"source": "https://example.com/page/hce",
|
||||
"properties": {
|
||||
"url": "https://images.example.com/hce-cover.jpg",
|
||||
"width": 800,
|
||||
"height": 800
|
||||
}
|
||||
},
|
||||
{
|
||||
"title": "To The Bone - Promo Shot",
|
||||
"source": "https://example.com/page/ttb",
|
||||
"thumbnail": {
|
||||
"src": "https://thumbnails.example.com/ttb-thumb.jpg"
|
||||
}
|
||||
},
|
||||
{
|
||||
"thumbnail": {
|
||||
"src": "https://thumbnails.example.com/unknown-thumb.jpg"
|
||||
},
|
||||
"properties": {
|
||||
"url": "https://images.example.com/unknown.jpg",
|
||||
"width": 640,
|
||||
"height": 480
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user