Sha256: d9454aeea3495edd31bee7208c1d52b76cd45472f54dedb80e692d0775680f2b

Contents?: true

Size: 631 Bytes

Versions: 14

Compression:

Stored size: 631 Bytes

Contents

require 'spec_helper'

describe "parsing a RH.csv file" do
  let(:nelfo) { EfoNelfo.load csv('rabatt.csv') }
  it { nelfo.must_be_instance_of EfoNelfo::V40::RH }
  # RH;EFONELFO;4.0;NO910478656MVA;NO000000000MVA;0;0;20130404;20140404;NOK;H;Alsell Norge AS;Vestre Svanholmen 4;;4313;SANDNES;NO
  it "assigns attributes" do
    nelfo.seller_id.must_equal "NO910478656MVA"
    nelfo.buyer_id.must_equal "NO000000000MVA"
  end

  it "assigns lines" do
    nelfo.lines.size.must_equal 4
    line = nelfo.lines.last
    line.product_type.must_equal 5
    line.product_number.must_equal "P10501"
    line.AvtaltPris.must_be_nil
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
efo_nelfo-2.0.0 spec/parsing/rh_spec.rb
efo_nelfo-1.7.0 spec/parsing/rh_spec.rb
efo_nelfo-1.6.2 spec/parsing/rh_spec.rb
efo_nelfo-1.6.1 spec/parsing/rh_spec.rb
efo_nelfo-1.6.0 spec/parsing/rh_spec.rb
efo_nelfo-1.5.5 spec/parsing/rh_spec.rb
efo_nelfo-1.5.4 spec/parsing/rh_spec.rb
efo_nelfo-1.5.3 spec/parsing/rh_spec.rb
efo_nelfo-1.5.2 spec/parsing/rh_spec.rb
efo_nelfo-1.5.1 spec/parsing/rh_spec.rb
efo_nelfo-1.5.0 spec/parsing/rh_spec.rb
efo_nelfo-1.4.0 spec/parsing/rh_spec.rb
efo_nelfo-1.3.2 spec/parsing/rh_spec.rb
efo_nelfo-1.3.1 spec/parsing/rh_spec.rb