1
0
зеркало из https://github.com/glebtv/yookassa.git synced 2026-09-07 19:35:51 +03:00
Этот коммит содержится в:
Gleb Tv
2026-07-18 14:31:53 +03:00
родитель 7339e4a53d
Коммит 04f37a9e6a
4 изменённых файлов: 21 добавлений и 3 удалений

17
spec/yookassa/entity/product_spec.rb Обычный файл
Просмотреть файл

@@ -0,0 +1,17 @@
# frozen_string_literal: true
RSpec.describe Yookassa::Entity::Product do
let(:attributes) do
{
description: "Fuel",
quantity: 1,
amount: { value: 100, currency: "RUB" },
vat_code: 1
}
end
it "defines excise as an optional numeric attribute" do
expect(described_class.new(**attributes, excise: "12.34").excise).to eq(12.34)
expect(described_class.new(**attributes).excise).to be_nil
end
end