Sha256: 467cc5c8af60118c5e748499825b39b93d1af5f47041083cffc41a98f0398657

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

require "spec_helper"

describe BrDanfe::DanfeLib::Options do
  it "returns the default config set in the code" do
    options = BrDanfe::DanfeLib::Options.new
    expect(options.logo).to eq("")
    expect(options.products_unit_price_precision).to eq(2)
    expect(options.products_quantity_precision).to eq(2)
  end

  it "returns the config set in params" do
    custom_options = { logo: "/fake/path/file.png",
      products_unit_price_precision: 3, products_quantity_precision: 4 }

    options = BrDanfe::DanfeLib::Options.new(custom_options)
    expect(options.logo).to eq("/fake/path/file.png")
    expect(options.products_unit_price_precision).to eq(3)
    expect(options.products_quantity_precision).to eq(4)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
br_danfe-0.5.1 spec/lib/danfe_lib/options_spec.rb