зеркало из
https://github.com/glebtv/yookassa.git
synced 2026-09-07 19:35:51 +03:00
Fix optional excise attribute
Этот коммит содержится в:
17
spec/yookassa/entity/product_spec.rb
Обычный файл
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
|
||||
Ссылка в новой задаче
Block a user