images get ratios
This commit is contained in:
@ -4,14 +4,22 @@ module Merged
|
||||
RSpec.describe Image, type: :model do
|
||||
let(:first) {Image.all.values.first}
|
||||
|
||||
it "has Pages.all" do
|
||||
it "has Image.all" do
|
||||
expect(Image.all.class).to be Hash
|
||||
end
|
||||
it "has image" do
|
||||
expect(first.class).to be Image
|
||||
end
|
||||
it "image has name" do
|
||||
it "has name" do
|
||||
expect(first.name).to eq "3dprinter_wide"
|
||||
end
|
||||
it "has height and width" do
|
||||
expect(first.height).to eq 457
|
||||
expect(first.width).to eq 1279
|
||||
end
|
||||
it "has height and width" do
|
||||
expect(first.aspect_ratio).to eq [13,5]
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user