Skip to content

Commit fb28271

Browse files
committed
DGUK-290 Fix collection image path
1 parent 7c6313c commit fb28271

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

app/services/dgu/collections_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def page
3131
end
3232

3333
def image_path
34-
"/images/collections/#{collection}.jpg"
34+
"v2/collections/badge-#{collection}.png"
3535
end
3636

3737
def collections_slugs

spec/services/dgu/collections_service_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@
131131
end
132132
end
133133

134+
describe "#image_path" do
135+
it "returns the image path for the collection" do
136+
service = Dgu::CollectionsService.new(collection)
137+
expect(service.image_path).to eq("v2/collections/badge-#{collection}.png")
138+
end
139+
end
140+
134141
describe "#previous_page" do
135142
it "returns nil when on the first page" do
136143
service = Dgu::CollectionsService.new(collection, first_page)

0 commit comments

Comments
 (0)