Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
require "rails_helper"
RSpec.describe ImagesHelper do
describe "#thumbnail_variant" do
it "calls variant with orient and size options" do
attachment = double(:attachment)
allow(attachment).to receive(:variant)
helper.thumbnail_variant(attachment)
expect(attachment).to have_received(:variant).with(
gravity: "center",
resize: "75x75>",
extent: "75x75",
background: "#fff",
)
end
end
describe "#medium_variant" do
it "calls variant with orient and size options" do
attachment = double(:attachment)
allow(attachment).to receive(:variant)
helper.medium_variant(attachment)
expect(attachment).to have_received(:variant).with(
gravity: "center",
resize: "100x100>",
extent: "100x100",
background: "#fff",
)
end
end
describe "#large_variant" do
it "calls variant with orient and size options" do
attachment = double(:attachment)
allow(attachment).to receive(:variant)
helper.large_variant(attachment)
expect(attachment).to have_received(:variant).with(
gravity: "center",
resize: "150x150>",
extent: "150x150",
background: "#fff",
)
end
end
end